Migrating Configuration Database to Another SQL Server

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:

  • High Availability. SQL Clustering and Always On Availability Group on external SQL Servers can be used for high availability of the configuration database. To learn about the configuration details, see this Veeam KB article.
  • Licensing. Some enterprises have dedicated virtual clusters for SQL Servers due to licensing constraints. In such cases, you can place the Veeam configuration database on an existing instance to lower the total cost of ownership.

If you need to migrate the Veeam Backup & Replication configuration database to another SQL 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.

Limitations and Considerations

Before you migrate the configuration database of Veeam Backup & Replication to another SQL server, consider the following limitations and considerations:

  • This section gives instructions on how to migrate a configuration database to another SQL server. If you need to migrate the Veeam Backup & Replication application itself, see Migrating Veeam Backup & Replication to Another Backup 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 are migrating the configuration database to a remote SQL instance that uses Windows Authentication, all services that had access to the remote SQL instance before a migration must have the these permissions after migration. For more information on permissions, see Permissions.
  • The account used to run Veeam Backup Service requires access to the database. For more information see, Permissions.
  • If a backup server and a configuration database are located in different AD domains, the AD domain where the configuration database is located must have a trust relationship with the AD domain to which the backup server is added.
  • When you migrate the configuration database to another SQL 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 the 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.
  • Veeam Backup Enterprise Manager collects data from backup servers with configuration databases that run on the same database engine as the Enterprise Manager configuration database. The database engine used by Veeam Backup Enterprise Manager and all of the Veeam Backup & Replication Servers managed by this Veeam Backup Enterprise Manager must match. To migrate the Enterprise Manager configuration database, see Veeam Backup Enterprise Manager Guide.

Migrating Configuration Database

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

  1. Stop and disable jobs.
  2. Back up the configuration database.
  3. Restore the configuration database from the backup.
  4. [Optional] Reactivate the Enterprise Manager Keyset.
  5. 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 Backup 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 

Note

Loss protection disabled warning is safe to ignore if you do not have Veeam Backup Enterprise Manager installed, your backup server is not registered with Veeam Backup Enterprise Manager server, or your system administrator chose not to enable loss protection functionality.

Step 3. Restore Configuration Database from Backup

Before you start the restore process, check the prerequisites. 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 section Restoring Configuration Database.

Step 4. [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 may 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 5. 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.