How to Migrate Veeam Backup Enterprise Manager's Database from Microsoft SQL to PostgreSQL
| KB ID: | 4409 |
| Product: | Veeam Backup & Replication | 12 | 12.1 | 12.2 | 12.3 | 12.3.1 | 12.3.2 | 13 | 13.1 |
| Published: | 2023-03-13 |
| Last Modified: | 2025-12-22 |
Purpose
This article documents the migration of the Veeam Backup Enterprise Manager (Enterprise Manager) configuration database from Microsoft SQL to PostgreSQL.
Notes:
- The migration process is one-way only. Migration can only be performed from Microsoft SQL to PostgreSQL.
- [Note: Starting in Veeam Backup & Replication 13, this limitation was removed, allowing Veeam Backup Enterprise Manager and the Veeam Backup & Replication deployments it manages to operate different database engines.]
For all builds of Veeam Backup & Replication 12.x, the database engine used by the Veeam Backup Enterprise Manager and all of the Veeam Backup & Replication Servers managed by that Veeam Backup Enterprise Manager must match. Any mismatch in the database engine will cause the Database Replication task to fail with either:-
Veeam Backup Enterprise Manager with Microsoft SQL Server configuration database does not support the management of backup servers using PostgreSQL.
or -
Veeam Backup Enterprise Manager with PostgreSQL configuration database does not support the management of backup servers using Microsoft SQL Server.
-
- Migration from Microsoft SQL to PostgreSQL is only possible for Veeam Backup Enterprise Manager running version 12 or newer.
Requirements
This procedure requires the following:
- The Veeam Backup Enterprise Manager database must presently be using Microsoft SQL.
- An existing PostgreSQL instance must be available for the database to be moved to, either local to the Veeam Backup Enterprise Manager software or remote.
Solution
Part 1: Back up the Current Veeam Backup Enterprise Manager Database
- Open an Administrative Command Prompt
- Navigate to the Veeam Backup Enterprise Manager install folder:
- Using the Enterprise Manager Database Migration Utility, create a Backup of the current Veeam Backup Enterprise Manager database.
Note: The account used to execute the Veeam.EM.DB.Migration.exe command must have the appropriate SQL-level permissions (db_owner or db_datareader + db_datawriter) to access and interact with the Enterprise Manager database.
In the command above, replace the following placeholders with valid data.
- <path>
- <password>
- <password_hint>
Example:
Veeam.EM.DB.Migration.exe /file:"C:\tmp\BEMConf.emco" /backupemdatabase /encryptionpassword:1l0v3KB5 /encryptionhint:bestpassever
Part 2: Restore the Enterprise Manager Database Backup to PostgreSQL
- Using the Enterprise Manager Database Migration Utility, restore the backup created in Step 3 to the destination PostgreSQL server.
In the command above, replace the following placeholders with valid data.
- <path>
- <password>
- <pg_servername>
- <pg_port>
- <pg_user>
- <pg_usr_password>
Note: If the target PostgreSQL server utilizes Windows Authentication, omit the /login and /password options. Without a /login or /password, the utility will default to using the account under which the Veeam Backup Enterprise Manager Service is running.
Example:
Veeam.EM.DB.Migration.exe /file:"C:\tmp\BEMConf.emco" /restoreemdatabase /encryptionpassword:1l0v3KB5 /servername:localhost /initialcatalog:VeeamBackupReporting /serverport:5432 /login:postgres /password:
- Using the Configuration Database Connection Settings utility, update the Enterprise Manager connection settings to use the Enterprise Manager database restored to the PostgreSQL server.
Part 3: Update Credentials for Veeam Backup & Replication Server(s)
- After migrating Enterprise Manager's Configuration Database, the credentials for each Veeam Backup & Replication Server added to Enterprise Manager must be updated to re-establish communication.
- Within the Enterprise Manager's Configuration section, select the Backup Servers section.
- For each Veeam Backup & Replication server listed:
- Select the entry.
- Click Edit...
- Enter Username and Password.
- Click OK.
- Once credentials for each Veeam Backup & Replication server have been updated, switch to the Sessions section.
- In the Sessions section, click Start Collecting and confirm that all new Database Replication tasks are completed Successfully.
- [Note: Starting in Veeam Backup & Replication 13, this limitation was removed, allowing Veeam Backup Enterprise Manager and the Veeam Backup & Replication deployments it manages to operate different database engines.]
For all builds of Veeam Backup & Replication 12.x only, the Database Replication task will fail for any Veeam Backup & Replication Server whose Configuration Database is still using Microsoft SQL, for more information on migrating the Veeam Backup & Replication Configuration Database to PostgreSQL, refer to Migrating Configuration Database to PostgreSQL Server in the Veeam Backup & Replication User Guide.
If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.