KB ID : 115041
Published : May 11, 2017
Created : May 11, 2017
Last Modified : Oct. 11, 2018

Purpose

To migrate Vembu BDR server(using PostgreSQL) from one machine to another in both physical and virtual environments.

Machine A – Old Backup Server machine.

Machine B – New Backup Server machine.

Solution

Steps to be done in Machine A :

A1: Stop VembuBDR Service.

A2: Go to ‘VembuBDR-Home’ folder and copy the following sub-folders completely as they are essential for migration: data, Plugin-data and conf.

A3: Open command prompt with administrative privileges and navigate the folder location to ‘PostgreSQL-Home\bin’ folder. Now execute the following command to take PostgreSQL database dump:

For Windows:

            pg_dump.exe -Upostgres -F c -b -f "Dumpfile_location" -d SGDatabase

Eg: C:\Program Files\PostgreSQL\9.6\bin>pg_dump.exe -Upostgres -F c -b -f "C:\Dump.sql" -d SGDatabase

For Linux:

            pg_dump -Upostgres -F c -b -f "Dumpfile_location" -d SGDatabase

Eg: pg_dump -Upostgres -F c -b -f "/home/Dump.sql" -d SGDatabase

Note: The above command once executed will require PostgreSQL password, make sure you provide the correct password to proceed further.

From Vembu BDR v3.9, we have modified the PostgreSQL port number to 32010 from the default port 5432. Customers migrating from Vembu BDR v3.9 and above, execute the commands given below for Windows and Linux:

For Windows:

            pg_dump.exe -Upostgres -p <port_num> -F c -b -f "Dumpfilelocation" -d SGDatabase

Eg: C:\Program Files\PostgreSQL\9.6\bin>pg_dump.exe -Upostgres -p 32010 -F c -b -f "C:\Dump.sql" -d SGDatabase

For Linux:

            pg_dump -Upostgres -p <port_num> -F c -b -f "Dumpfilelocation" -d SGDatabase

Eg: pg_dump -Upostgres -p <port_num> -F c -b -f "/home/Dump.sql" -d SGDatabase

A4: Copy the below-mentioned items and save it collectively under a folder named “VembuBDRServerRebuild”:

  • ‘Plugin-data’, ‘data’ and ‘conf’ folders (Taken from ‘VembuBDR-Home’ which typically will be C:\Program Files\Vembu\VembuBDR for Windows and /home/vembubdr/Vembu/VembuBDR for Linux).

  • Storage data (‘sgstorage’ folder from drives configured as storage for VembuBDR server). [When more than one drive is configured for storage, make sure you copy them under separate folders named after drive letters for ease of access. For example, when E and H drives are configured as storage drives: E:\sgstorage, H:\sgstorage. Copy sgstorage under two folders named: E and H respectively.]

  • PostgreSQL dump - dump file created in step A3 with the name ‘Dump.sql’.

Steps to be done in Machine B:

B1: Download BDR server installer from Vembu Downloads and make sure the version is same as Vembu BDR running in machine A.

B2: Run the installer with administrator\root privileges. Note: Once installation completes, make sure Vembu BDR service is not started. If started, then stop the service.

B3: Open CMD prompt with administrator privileges and run below command from PostgreSQL installation location to import the dumped database:

pg_restore -d SGDatabase --format=c -Upostgres "Postgres Dump File Location"

Ex: pg_restore.exe -d SGDatabase --format=c -Upostgres "D:/Dump.sql"

pg_restore -d SGDatabase --format=c -Upostgres /home/Dump.sql

B4: Open ‘VembuBDR-Home’ location and replace the following sub-folders with the sub-folders copied from Machine A: ‘data’, ‘Plugin-data’ and ‘conf’ (Step A4).

B5: Copy storage data (‘sgstorage’ folder) to the storage location in Machine B. Make sure the drive letters of the storage location in Machine B is as same as Machine A( E and H as mentioned in step A4), then start VembuBDR service after ensuring all information are updated correctly.

Note: If the drive letters of the storage location are different between Machine A and Machine B, then kindly contact Vembu support for further assistance with the migration process.

B6: Once Vembu BDR service is started in Machine B, ensure the backups are resumed and running successfully.

edit retag flag offensive close merge delete