Migrating Configuration Database to Another SQL Server

In this article

    It is the best practice to keep the Veeam Backup & Replication application and its configuration database on the same server to maintain lowest latency and highest performance. However, in some scenarios a remote Microsoft SQL Server instance can be the better choice. For more information, see guidelines in the Veeam Backup & Replication Best Practices. This section gives instructions on how to migrate a configuration database of Veeam Backup & Replication to a Microsoft SQL Server instance located on a remote server.

    If you need to migrate the Veeam Backup & Replication configuration database to another server, you can connect the configuration database to a Microsoft SQL Server instance deployed on another server and restore the configuration settings from the backup. As a result, you will be able to continue using the same Veeam Backup & Replication server but it will be connected to a configuration database on another server.

    Note

    Mind the following:

    • This section gives instructions on how to migrate a configuration database to another server. If you need to migrate the Veeam Backup & Replication application itself, see Migrating Veeam Backup & Replication to Another Server.
    • It is recommended that you use Veeam Backup & Replication tools to create configuration backups and migrate the configuration database. If you use native Microsoft SQL Server tools or others, after migration, some information, such as secure configuration data, may not be accessible.

    If you want to migrate the configuration database of Veeam Backup & Replication to another server, perform the following steps:

    1. Stop and disable jobs.
    2. Back up the configuration database.
    3. Connect Veeam Backup & Replication to another SQL Server instance.
    4. Restore the configuration database from the backup.
    5. [Optional] Reactivate the Enterprise Manager Keyset.
    6. Finish the configuration.

    Step 1. Stop and Disable Jobs

    Before you start the database migration, you must finish all jobs and restore sessions. If the job is scheduled, you must disable the job. For instructions on how to stop and disable jobs, see Managing Jobs.

    Note

    Do not start or enable any jobs until the migration of Veeam Backup & Replication is finished. If you start a job before migration is completed, Veeam Backup & Replication will produce a new restore point in the chain and update the chain metadata. The created configuration backup will not contain information about this new restore point. When you migrate data from the configuration backup to the database and start the job again, Veeam Backup & Replication will fail to synchronize the metadata of the backup chain with data in the database. As a result, the job will fail.

    Step 2. Create Configuration Database Backup

    To create a configuration database backup manually, perform the following steps:

    1. From the main menu of the Veeam Backup & Replication console, select Configuration Backup.
    2. Make sure that the Enable configuration backup to the following repository check box is selected.
    3. From the list of repositories, select a backup repository in which the configuration backup must be stored.
    4. Click Backup now.

    Migrating Configuration Database to Another SQL Server 

    Step 3. Connect Veeam Backup & Replication to Another MS SQL Server Instance

    Veeam Backup & Replication comes with the Configuration Database Connection Settings utility (Veeam.Backup.DBConfig.exe) that allows you to manage connection settings for Veeam Backup & Replication configuration database. You can use the utility to connect Veeam Backup & Replication to another SQL Server database. To do this, perform the following steps:

    1. In the Start menu, click Configuration Database Connection Settings to launch the Veeam.Backup.DBConfig.exe utility. To run the utility, you must have administrative rights on the local machine, as long as the utility makes changes to the registry. If prompted at the launch, choose Run as administrator.

    You can also start the utility from its installation folder. By default, the utility is in the following folder: %PROGRAMFILES%\Common Files\Veeam\Backup and Replication\DBConfig.

    1. In the Product step of the wizard, select Veeam Backup and Replication.

    Migrating Configuration Database to Another SQL Server 

    1. In the Connection Settings step of the wizard, specify the target database settings:
    1. At the Database name field, specify a name for a new database that will be created on the target server.
    2. At the Server name field, specify the server and Microsoft SQL Server instance name where you want to create the configuration database. Use the following format: SERVER_NAME\INSTANCE_NAME. Microsoft SQL Server instances available on the network are shown in the Server name list.
    3. Select the SQL authentication method to use the Microsoft SQL Server authentication.
    4. At the Login name and Password fields, specify credentials that will be used to connect to the target Microsoft SQL Server instance and create a new database.

    Important

    When you migrate the configuration database to another server, you must use the Microsoft SQL Server credentials that have CREATE ANY DATABASE permission on the target Microsoft SQL Server. For details, see Microsoft Docs.

    After database creation this account automatically gets a db_owner role and can perform all operations with the database. If the current account does not have this permission, a Database Administrator may create an empty database in advance and grant the db_owner role to the account that will be used for migration of the configuration database.

    Migrating Configuration Database to Another SQL Server 

    1. Before proceeding, the utility validates the specified settings to make sure that the user account has enough privileges to access the database. For the new settings to be applied, the utility needs to stop Veeam Backup & Replication services and jobs that are currently running. Click Yes to confirm the operation.

    Wait for the operation to complete and click Next to proceed to the Summary step of the wizard.

    Migrating Configuration Database to Another SQL Server 

    1. At the Summary step of the wizard, select the Start the product automatically check box and click Finish.

    Migrating Configuration Database to Another SQL Server 

    Step 4. Restore Configuration Database from Backup

    After you connect Veeam Backup & Replication to another Microsoft SQL Server instance, the configuration database will be empty. You must restore the configuration database from the backup created in Step 2.

    To restore the configuration database, perform the following:

    1. From the main menu of the Veeam Backup & Replication console, select Configuration Backup.
    2. In the Restore section, click Restore.

    Migrating Configuration Database to Another SQL Server 

    1. At the Restore Mode step of the Veeam Backup & Replication Configuration Restore wizard, select Migrate.

    Migrating Configuration Database to Another SQL Server 

    1. Complete the wizard as described in the Restoring Configuration Database section.

    Step 5. [Optional] Reactivate Enterprise Manager Keyset

    After you migrate the Veeam Backup & Replication configuration database to another server, Veeam Backup Enterprise Manager still sees the Veeam Backup & Replication server. However, you might need to reactivate encryption keys.

    If you use the Data Encryption feature to encrypt backups and your Veeam Backup & Replication server is added to the Veeam Backup Enterprise Manager infrastructure, then you must reactivate the Enterprise Manager keyset.

    To reactivate the Enterprise Manager key, perform the following steps:

    1. In the Veeam Backup Enterprise Manager web console, open the Settings section of the Configuration view.
    2. Open the Key Management tab.
    3. In the Managed keys section, select the necessary keyset and click Activate.

    For detailed instructions, see the Activating Enterprise Manager Keyset section in the Veeam Backup Enterprise Manager Guide.

    Step 6. Finish Configuration

    After restoring the configuration database from the backup, finalize the configuration:

    Reschedule your configuration database backup. Also, check if you can see the Loss protection enabled label.