Vembu BDR v3.7 and Above Migration with PostgreSQL Server

Vembu BDR v3.7 and Above Migration with PostgreSQL Server

KB ID: 115041
Objective:
Guide users through the migration process of Vembu BDR server (utilizing PostgreSQL) from one machine to another in both physical and virtual environments.
Source Machine (Machine A - Old Backup Server):
A1: Stop the VembuBDR Service.
A2: In the 'VembuBDR-Home' folder, copy the following sub-folders entirely as they are crucial for migration: 'data,' 'Plugin-data,' and 'conf.'
A3: Open a command prompt with administrative privileges and navigate to the 'PostgreSQL-Home\bin' folder. Execute the following command to create a PostgreSQL database dump:
pg_dump -Upostgres -F c -b -f "Dumpfile_location" -d SGDatabase
Example:
pg_dump -Upostgres -F c -b -f "/home/Dump.sql" -d SGDatabase
Note: Provide the correct PostgreSQL password when prompted. For Vembu BDR v3.9, the port number is 32010, and for Vembu BDR V3.9 and below, the port number is 5432.
A4: Collect and save the following items under a folder named "VembuBDRServerRebuild":
  1. 'Plugin-data,' 'data,' and 'conf' folders (Taken from 'VembuBDR-Home,' typically C:\Program Files\Vembu\VembuBDR for Windows and /home/vembubdr/Vembu/VembuBDR for Linux).
  2. Storage data ('sgstorage' folder from drives configured as storage for VembuBDR server). When multiple drives are configured for storage, copy them under separate folders named after drive letters (e.g., E:\sgstorage, H:\sgstorage).
PostgreSQL dump - dump file created in step A3 with the name 'Dump.sql.'
Destination Machine (Machine B - New Backup Server):
B1: Download the BDR server installer from Vembu Downloads, ensuring the version matches the Vembu BDR running on Machine A.
B2: Run the installer with administrator/root privileges. After installation, ensure the Vembu BDR service is not started. If started, stop the service.
B3: Open CMD prompt with administrator privileges and run the following command from the PostgreSQL installation location to import the dumped database:
pg_restore.exe -d SGDatabase --format=c -Upostgres -p<port_num> "Postgres Dump File Location"
Example:
pg_restore.exe -d SGDatabase --format=c -Upostgres -p32010 D:/Dump.sql
B4: In the 'VembuBDR-Home' location, replace the following sub-folders with those copied from Machine A: 'data,' 'Plugin-data,' and 'conf' (from Step A4).
B5: Copy storage data ('sgstorage' folder) to the storage location in Machine B. Ensure the drive letters of the storage location in Machine B match those of Machine A (E and H as mentioned in Step A4). Start VembuBDR service after verifying that all information is updated correctly.
Note: If the drive letters of the storage location differ between Machine A and Machine B, contact Vembu support for further assistance.
B6: Once Vembu BDR service is started in Machine B, ensure that backups are resumed and running successfully.