Automating Configuration Database Restore
If you want to automate the process of the configuration database restore, you can do it using the config.cfg file.
Limitations and Considerations
Before you start the restore process, check the prerequisites.
Restoring Configuration Database
To restore Veeam Backup & Replication configuration database using the config.cfg file, perform the following steps:
Step 1. Generate Configuration File
To generate the configuration file, do the following:
- Open the command prompt.
- Change the directory to the directory where the Veeam.Backup.Configuration.Restore.exe file is stored. By default, C:\Program Files\Veeam\Backup and Replication\Backup.
cd "C:\Program Files\Veeam\Backup and Replication\Backup" |
- Use the following command to generate the configuration file. In the genconfig parameter, specify the path where the configuration file will be saved.
Veeam.Backup.Configuration.Restore.exe /genconfig:C:\config.cfg |
When you perform the command, the configuration restore wizard will appear.
Step 2. Complete Configuration Restore Wizard
Complete the configuration restore wizard.
After you complete the configuration restore wizard, the configuration file will be generated by the path you specified in the genconfig parameter. The configuration file will contain all the preferences you specified in the configuration restore wizard. You can also edit it manually later.
Step 3. Restore Configuration Database
To restore the configuration database, do the following:
- Open the command prompt.
- Change the directory to the directory where the Veeam.Backup.Configuration.Restore.exe file is stored. By default, C:\Program Files\Veeam\Backup and Replication\Backup.
cd "C:\Program Files\Veeam\Backup and Replication\Backup" |
- Use the following command to restore the configuration file. In the config parameter, specify the path where the configuration file will be saved.
Veeam.Backup.Configuration.Restore.exe /config:C:\config.cfg |
Veeam Backup & Replication will use the preferences you specified in the config.cfg file to perform the configuration database restore.
The path to the log file is %ProgramData%\Veeam\Backup\Utils\Util.VeeamBackupConfiguration.Restore.log.
Configuration File Parameters
Parameter | Description |
---|---|
RestoreMode | Specifies the configuration restore mode. Accepts values: Restore or Migrate. Default: Restore. |
FileMode | Specifies the configuration backup file path type. Accepts values: Local or Network. Default: Local. |
ConfigurationFile | Specifies the full path to the configuration backup file. |
ConfigurationFilePassword | Specifies the password to decrypt the configuration backup file. |
DatabaseType | Specifies the target database engine. Accepts values: Microsoft SQL or PostgreSQL. Default: PostgreSQL. |
DatabaseName | Specifies the target database name to use for the configuration restore. Default: VeeamBackup. |
DatabaseServer | Specifies the database server instance. For Microsoft SQL, use the localhost\instanceName format. For PostgreSQL, use the localhost\instancePort format. |
UseWindowsAuthentication | Defines that Veeam Backup & Replication will use Windows authentication to perform the configuration restore. Accepts values: True or False. Default: True. Note: This parameter is required if you do not use the SQL Server authentication. |
SqlUser | Specifies the user name for the SQL Server authentication. |
SqlPassword | Specifies the password for the SQL Server authentication. |
PgDumpPath | Specifies the path to the PostgreSQL pg_dump utility. |
RestoreBackups | Defines that Veeam Backup & Replication will restore backup and replica restore points catalog. Accepts values: True or False. Default: False. |
RestoreSessions | Defines that Veeam Backup & Replication will restore session history. Accepts values: True or False. Default: False. |
EnablePowerShellPolicy | Defines that Veeam Backup & Replication will enable PowerShell execution policy setting required for SCVMM. Accepts values: True or False. Default: False. |
BackupExistingDb | Defines that Veeam Backup & Replication will back up existing database before performing the configuration restore. Accepts values: True or False. Default: False. |
LaunchVbrConsole | Defines that Veeam Backup & Replication will launch the console after the configuration restore is complete. Accepts values: True or False. Default: False. |
CreateDbIfNotExists | Defines that Veeam Backup & Replication will create a new database if selected database does not exist. Accepts values: Yes or No. Default: Yes. Note: The parameter value No will terminate the configuration restore if the selected database does not exist. |
ProceedWithUnsupportedDb | Defines that Veeam Backup & Replication will proceed the configuration restore with the selected database even if it has unknown type. Accepts values: Yes or No. Default: No. Note: The parameter value Yes will terminate the configuration restore if the selected database has unknown type. |
UseLockedDb | Defines that Veeam Backup & Replication will proceed the configuration restore with the selected database even if it is owned by another backup server. Accepts values: Yes or No. Default: Yes. Note: The parameter value No will terminate the configuration restore if the selected database is owned by another backup server. |
UseVbrDb | Defines that Veeam Backup & Replication will overwrite existing database even if it is Veeam Backup & Replication configuration database. Accepts values: Yes or No. Default: Yes. Note: The parameter value No will terminate the configuration restore if the existing database is Veeam Backup & Replication configuration database. |
SwitchRestoreMode | Defines that Veeam Backup & Replication will switch to the configuration restore mode if one or more enabled backup jobs are found. Accepts values: Yes, No or Cancel. Default: Cancel. Note: The parameter value Cancel will terminate the configuration restore if enabled backup jobs are found. |