Rebuilding Vembu BDR v3.5 and Above [Server Running MySQL, Mongo]
This knowledge base article provides detailed instructions for rebuilding a Vembu BDR backup server installation, specifically for versions 3.5 and above. This process is essential in the event of a BDR backup server machine corruption or system crash. To successfully rebuild a Vembu BDR backup server, you will need to have the following:
1. Backed up data (metadata can be reconstructed from this data).
2. A dumped Server Configuration Database file.
The default location for the Vembu BDR backup server's configurations is a database that is dumped daily. This file is stored under the path specified during installation for the backup storage location (e.g.,`/sgstorage/Default_Repo/sgdatabase/sgdatabase.sql`).
Steps to Rebuild Backup Server:
Rebuilding the backup server involves a three-step process:
1. Install Vembu BDR and MySQL Server on the New Machine:
Install and configure Vembu BDR, MySQL Server, MySQL Connectors, and MongoDB on the new machine. Simplified installation bundles are available for MySQL and its components, which automate the installation and configuration. Ensure that you download the same version of the Vembu BDR Server installer that was running on the previous machine.
Download Links for Different Versions:
- v3.5
- v3.6
- v3.6 Update 1
2. Import Vembu BDR Backup Server Database:
After installing Vembu BDR and MySQL Server on the new machine, import the Vembu BDR backup server database from the dumped database file of the crashed machine. Execute the provided command in the MySQL location to achieve this.
For Windows OS:
mysql -u [username] -p[password] < [BackupLocation]/DBNAME/DB_NAME.sql
Example:
- MySQL username and password.
- Backup location where the database dump file is stored.
For Linux OS:
mysql -u [username] -p[password] < [BackupLocation]/DBNAME/DB_NAME.sql
Example:
- MySQL username and password.
- Backup location where the database dump file is stored.
3. Rebuilding Backup Server Metadata from Backup Data:
Once the MySQL database is recovered from the dump file, install the Vembu BDR backup server application on a new system with the same Vembu BDR ID as the old backup server machine. Ensure that the hostname of the new backup server matches the old one, and specify the same storage location as before.
- Choose not to start the Vembu BDR service immediately after installation. It can be started with a minor adjustment during installation.
- Delete the `data/dbpopulation.txt` file in the fresh Vembu BDR installation location. This step is essential for proper internal database creation in the fresh installation.
- Confirm that the backed-up data (`<drive_letter sgstorage="">`) is available in the backup location.
- Reconstruct the metadata of the backups using the backed-up data by running Vembu BDR from its installation location.
Commands for Rebuilding Metadata:
For Windows:
- Rebuild MySQL and MongoDB metadata for all backups:
bin\VembuBDR.exe CheckAndUpdateDB All
- Rebuild MySQL metadata alone for all backups:
bin\VembuBDR.exe CheckAndUpdateDB MySQL
- Rebuild MongoDB metadata alone for all backups:
bin\VembuBDR.exe CheckAndUpdateDB Mongo
- Rebuild MySQL and MongoDB metadata for all backups under one client machine:
bin\VembuBDR.exe CheckAndUpdateDB All CLIENT_NAME
- Rebuild MySQL and MongoDB metadata for one backup:
bin\VembuBDR.exe CheckAndUpdateDB All CLIENTNAME BACKUPNAME
For Linux:
- Rebuild MySQL and MongoDB metadata for all backups:
./bin/VembuBDR CheckAndUpdateDB All
- Rebuild MySQL metadata alone for all backups:
./bin/VembuBDR CheckAndUpdateDB MySQL
- Rebuild MongoDB metadata alone for all backups:
./bin/VembuBDR CheckAndUpdateDB Mongo
- Rebuild MySQL and MongoDB metadata for all backups under one client machine:
./bin/VembuBDR CheckAndUpdateDB All CLIENT_NAME
- Rebuild MySQL and MongoDB metadata for one backup:
./bin/VembuBDR CheckAndUpdateDB All CLIENTNAME BACKUPNAME
This command will construct all the metadata and insert it into the database. Your database and all the backed-up data are now attached to the new backup server machine.