> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/powershell/fr/powershell-commands/restore-dpscustomfolders.md).

# Restore-DPSCustomFolders

Restore-DPSCustomFolders restaure les dossiers personnalisés et les modèles d'événements personnalisés d'une sauvegarde de données vers une installation de Devolutions Server.

### Synopsis

Restaurer les dossiers personnalisés depuis une sauvegarde de données.

### Syntaxe

#### \_\_AllParameterSets

```
Restore-DPSCustomFolders [-BackupPath] <string> [-ApplicationPath] <string> [-WhatIf] [-Confirm]
 [<CommonParameters>]
```

### Description

Restaurer les dossiers personnalisés d'une sauvegarde de données vers l'instance Devolutions Server. Cette applet de commande copie le dossier Custom et le dossier Templates\Events\Custom depuis l'emplacement de la sauvegarde de données vers le chemin d'installation de Devolutions Server. Cette applet de commande nécessite des permissions d'écriture sur le système de fichiers vers le chemin d'installation de Devolutions Server et des autorisations de lecture vers l'emplacement de la sauvegarde de données.

### Exemples

#### Exemple 1

**Définir les chemins pour l'instance Devolutions Server et les emplacements de sauvegarde de données**

```powershell
PS C:\> $DVLSPath = '/home/myuser/dvls/'
PS C:\> $backupConfigurationFiles = '/home/myuser/dvlsBackup/dvlsConfig/'
PS C:\> $backupInstallationFiles = '/home/myuser/dvlsBackup/dvlsFiles/'
PS C:\> $downloadPath = '/home/myuser/dvlsLatest.tar.gz'
```

**Étape 1 : Sauvegarder la configuration actuelle et les fichiers d'installation**

```powershell
PS C:\> Backup-DPSConfigurationFiles -ApplicationPath $DVLSPath -BackupConfigurationPath $backupConfigurationFiles
PS C:\> Remove-Item -Path "$backupInstallationFiles/*" -Recurse -Force
PS C:\> Backup-DPSInstallationFiles -ApplicationPath $DVLSPath -BackupPath $backupInstallationFiles
PS C:\> $connectionString = (Get-DPSAppSettings -ApplicationPath $backupConfigurationFiles).ConnectionStrings.LocalSqlServer
```

**Étape 2 : Télécharger et extraire la nouvelle version de DVLS**

```powershell
PS C:\> Get-DPSProduct -Name DPSLinuxX64bin -Destination $downloadPath
PS C:\> tar -xzf $downloadPath -C $DVLSPath --strip-components=1
```

**Étape 3 : Mettre à jour la base de données**

```powershell
PS C:\> Update-DPSDatabase -ConnectionString $connectionString -InstallationPath $DVLSPath
```

**Étape 4 : Restaurer les fichiers personnalisés et la configuration**

```powershell
PS C:\> Restore-DPSCustomFolders -BackupPath $backupInstallationFiles -ApplicationPath $DVLSPath
PS C:\> Restore-DPSAnomalyDetectionFolder -BackupPath $backupInstallationFiles -ApplicationPath $DVLSPath
PS C:\> Restore-DPSConfigurationFiles -BackupConfigurationPath $backupConfigurationFiles -ApplicationPath $DVLSPath
```

Processus de mise à jour d'une instance Devolutions Server.

### Paramètres

#### -ApplicationPath

Chemin de l'instance Devolutions Server.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 2
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -BackupPath

Chemin du dossier de sauvegarde de données à partir duquel restaurer les dossiers personnalisés.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
  Position: 1
  IsRequired: true
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -Confirm

Vous demande une confirmation avant d'exécuter l'applet de commande.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- cf
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### -WhatIf

Montre ce qui se produirait si l'applet de commande était exécutée. L'applet de commande n'est pas exécutée.

```yaml
Type: System.Management.Automation.SwitchParameter
DefaultValue: False
SupportsWildcards: false
Aliases:
- wi
ParameterSets:
- Name: (All)
  Position: Named
  IsRequired: false
  ValueFromPipeline: false
  ValueFromPipelineByPropertyName: false
  ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

#### CommonParameters

Cette applet de commande prend en charge les paramètres communs : -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction et -WarningVariable. Pour plus d'information, consultez [about\_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

### Notes

Pour plus d'information, tapez « Get-Help Restore-DPSCustomFolders -detailed ». Pour de l'information technique, tapez « Get-Help Restore-DPSCustomFolders -full ».


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.devolutions.net/powershell/fr/powershell-commands/restore-dpscustomfolders.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
