KB ID : 115042
Published : May 11, 2017
Created : May 11, 2017
Last Modified : Sept. 16, 2020

Challenge

Migrating Vembu BDR/ Vembu OffsiteDR internal database(PostgreSQL) files from one location to another location.

Cause

Storage space of the PostgreSQL database increase when there is an increase in backup data size in the Vembu BDR/Vembu OffsiteDR server.

Solution

Follow steps given below to migrate PostgreSQL data:

Vembu BDR Backup Server/Vembu Offsite DR Server installed on Windows

Step 1: Find the PostgreSQL data storage location

Follow the below steps to get the PSQL data location from the registry

1) Open Windows Registry editor

2) Navigate to the following location

 “HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\VembuPostgreSQL” (Vembu BDR Suite 4.0 & Above)

(or)

 “HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\PostgreSQL” (Vembu BDR Suite 3.9 & below)

3) Double click on the ‘ImagePath’ to open it

4) The path after "VembuPostgreSQL" -D or "PostgreSQL" -D in the value data is the PSQL data folder location

For example, E:\PostgreSQLData is the PSQL data storage location in the following value data

 "C:\Program Files\Vembu\VembuBDR\..\PostgreSQL\10\bin\pg_ctl.exe" runservice -N "VembuPostgreSQL" -D "E:\PostgreSQLData" -w

Edit ImagePath

Step 2: Open the windows services (services.msc) and stop the following services

  • VembuBDR or VembuOffsiteDR
  • VembuPostgreSQL

Note: If the Vembu BDR tray application pops-up after the services are stopped, click on “No” to stop the tray from starting the Vembu BDR service automatically.

Step 3: Copy the PostgreSQLData folder to the new location where you want to migrate the PostgreSQL data. Make sure the directory/folder where you moved the PostgreSQLData folder has all permissions(read/write) for the local system user.

Step 4: Update the details of the new PostgreSQLData folder in the registry.

Follow the below steps to update PSQL data location in the registry

1) Open Windows Registry editor

2) Navigate to the following location

 “HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\VembuPostgreSQL” (Vembu BDR Suite 4.0 & Above)

(or)

 “HKEYLOCALMACHINE\SYSTEM\CurrentControlSet\Services\PostgreSQL” (Vembu BDR Suite 3.9 & below)

3) Double click on the ‘ImagePath’ to open it

4) Update the new PostgreSQLData folder path in the value data after "VembuPostgreSQL" -D or "PostgreSQL" -D

For example, If F:\Newfolder\PostgreSQLData is the new PSQL data storage location, then update the value data as following

 "C:\Program Files\Vembu\VembuBDR\..\PostgreSQL\10\bin\pg_ctl.exe" runservice -N "VembuPostgreSQL" -D "F:\Newfolder\PostgreSQLData" -w

Edit ImagePath

Step 5: Open the windows services (services.msc) and start the following services

  • VembuPostgreSQL
  • VembuBDR or VembuOffsiteDR

Vembu BDR Backup Server/Vembu Offsite DR Server installed on Ubuntu

Step 1: Start an interactive PostgreSQL session and execute the following command to find the current data directory path: “show data_directory;”

Open<em>Postgres</em>Data<em>Directory</em>in_Ubuntu

Step 2: Stop Vembu BDR/Vembu OffsiteDR and PostgreSQL services using below command:

  • /etc/init.d/postgresql stop
  • /etc/init.d/vembubdr stop (or) - /etc/init.d/Vembuoffsitedr stop

Step 3: Move data directory from the old location(Path Found in Step 1) to a new location

Step 4: Open ‘postgresql.conf’ file and update ‘data_directory’ value with new path location

Ex: By default, configuration file can be found in following location: /etc/postgresql/9.6/main/postgresql.conf

image description

Step 5: Start PostgreSQL service by executing following command: /etc/init.d/postgresql start

Step 6: Ensure the new data location is updated successfully by repeating Step 1

Step 7: Once the new location is updated successfully, start Vembu BDR (or) Vembu OffsiteDR service to resume backup/replication tasks.

edit retag flag offensive close merge delete