#1 Global Leader in Data Resilience

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
Published: 2023-03-13
Last Modified: 2024-01-05
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Purpose

This article documents migrating 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.
  • 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

  1. Open an Administrative Command Prompt
  2. Navigate to the Veeam Backup Enterprise Manager install folder:
cd %PROGRAMFILES%\Veeam\Backup and Replication\Enterprise Manager\
  1. Using the Enterprise Manager Database Migration Utility, create a Backup of the current Veeam Backup Enterprise Manager database.
Veeam.EM.DB.Migration.exe /file:"<path>" /backupemdatabase /encryptionpassword:<password> /encryptionhint:<password_hint>

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

  1. Using the Enterprise Manager Database Migration Utility, restore the backup created in Step 3 to the destination PostgreSQL server.
Veeam.EM.DB.Migration.exe /file:"<path>" /restoreemdatabase /encryptionpassword:<password> /servername:<pg_servername> /initialcatalog:VeeamBackupReporting /serverport:<pg_port> /login:<pg_user> /password:<pg_usr_password>

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:
  1. 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.
    1. Within the Enterprise Manager's Configuration section, select the Backup Servers section.
    2. For each Veeam Backup & Replication server listed:
      1. Select the entry.
      2. Click Edit...
      3. Enter Username and Password.
      4. Click OK.
    3. Once credentials for each Veeam Backup & Replication server have been updated, switch to the Sessions section.
    4. In the Sessions section, click Start Collecting and confirm that all new Database Replication tasks are completed Successfully.
  • 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.
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.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.