KB ID : 115063
Published : April 2, 2018
Created : April 2, 2018
Last Modified : Nov. 13, 2018

Challenge

A hardware failure or a system crash in the machine running Vembu BDR backup server may lead to loss of Vembu BDR application and its backend(PostgreSQL server) installations. However, the backup data might still be intact if stored in a separate storage device. In that case, it is possible to rebuild the Vembu BDR backup server completely provided the backup data and the database dump file are intact in the backup storage location.

Solution

In re-building a Vembu BDR backup server, you need to have the following:

  • Backup storage targets which hold backup data (i.e., sgstorage folder from all backup data storage drives attached earlier).When more than one drive is configured for storage, make sure you have all of them. For example, when E and H drives are configured as storage drives, then make sure you have both E:\sgstorage, H:\sgstorage. Now rename the ‘sgstorage’ folders to name like old1sgstorage,old2sgstorage.
  • ‘Plugin-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).
  • Dumped Server Configuration Database file - SGDatabase.sql

By default, the Vembu BDR backup server’s configurations are stored in a database that is dumped daily. This file is dumped under the path given during installation for the backup storage location. For e.g. E:\sgstorage\DefaultRepo\SGDatabase.sql for Windows and /sgstorage/DefaultRepo/SGDatabase/SGDatabase.sql for Linux

Steps to Rebuild Backup Server

Rebuilding the backup server is a two-step process

  • Installation of Vembu BDR and PostgreSQL database.

  • Importing of Vembu BDR backup server database

Installation of Vembu BDR and PostgreSQL database

1) Download the same version of Vembu BDR Server installer which was running earlier in your machine from the links provided below:

v3.7 , v3.7 Update 1 , v3.8 , v3.8 Update 1 , v3.9 , v3.9 Update 1 , v3.9.1 , v3.9.1 Update 1

2) Run the installer with administrator\root privileges. Now make sure you configure the same drive letters for storage location as configured previously. Say like same E drive as mentioned in earlier steps.

Note: Once installation completes, make sure Vembu BDR service is NOT started. If started, then stop the service.

3) Open ‘Vembu BDR-Home’ location and replace the following sub-folders with the sub-folders copied earlier: ‘Plugin-data’ and ‘conf’

4) Now copy the renamed sgstorage folders “old1sgstorage,old2sgstorage” [Renamed while following earlier steps] to respective location say E, H Drive and move it to original name as “sgstorage”.

Importing of Vembu BDR backup server database

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

For Windows:

psql.exe -U <user_name> -p <port_num> -d <destination_db> -f <file_path>

Ex: C:\Program Files\PostgreSQL\9.6\bin>psql.exe -U postgres -p 32010 -d SGDatabase -f "E:\sgstorage\Default_Repo\SGDatabase.sql"

For Linux:

psql -U <user_name> -p <port_num> -d <destination_db> -f <file_path>

Ex: psql -U postgres -p 32010 -d SGDatabase -f /sgstorage/Default_Repo/SGDatabase/SGDatabase.sql

  • To find the port number of PostgreSQL you can execute the command "\conninfo" in the PostgreSQL command line util.

2) If you want to rebuild with all backups present in the backup server, then execute below command in command prompt from the “VembuBDR-Home” location

For Windows:

   bin\VembuBDR.exe CheckAndUpdateDB All ChunkEntryRefill

For Linux:

   ./bin/VembuBDR CheckAndUpdateDB All ChunkEntryRefill

[or]

If you want to recover the shared schema for a particular backup job name, then execute below command

For Windows:

  bin\VembuBDR.exe CheckAndUpdateDB All <ClientName> <BackupName> ChunkEntryRefill

For Linux:

   ./bin/VembuBDR CheckAndUpdateDB All <ClientName> <BackupName> ChunkEntryRefill

After importing the databases please start Vembu BDR, PostgreSQL service and ensure the backups are resumed and running successfully.

edit retag flag offensive close merge delete