Steps to migrate backup storage from one drive to another

Steps to migrate backup storage from one drive to another

KB ID:  115906
Purpose:
This document serves as a guide for users undertaking the migration of BDRSuite storage volumes between drives with different drive letters.
Storage Migration Steps:
Step 1: Stop BDRSuite Service
From the SGTray application located in the Windows taskbar notification section, stop the BDRSuite service before initiating storage migration.
Step 2: Database Dump (Optional)
To ensure safety, take a dump of the main database (SGDatabase) using the following steps:
  1. Open the command prompt with administrator privileges.
  1. Navigate to the PostgreSQL bin location
Example: cd "C:\Program Files\Vembu\PostgreSQL\<postgres Version>\bin"
  1. Run the command:
pg_dump.exe -U postgres -p32010 -d SGDatabase > C:\SGDatabase_Dump.sql
Note: If prompted for a password, type "admin" and press Enter.
Step 3: Copy sgstorage Folder
Copy the `sgstorage` folder from the old storage location to the new storage location. Ensure successful data transfer before proceeding.
Step 4: Run Storage Migration Util
  1. Open the command prompt with administrator privileges.
  2. Navigate to the VembuBDR installation location (e.g., `cd "C:\Program Files\Vembu\VembuBDR"`).
  3. Run the utility with the following command:
  bin\VembuBDR.exe ChangeRepository <Old_Storage_Drive> <New_Storage_Drive> <PoolName>
  Example:  bin\VembuBDR.exe ChangeRepository E:/ D:/ FirstStoragePool
  1. If multiple storage pools are configured, repeat the command for each pool.
Example:
  bin\VembuBDR.exe ChangeRepository E:/ D:/ FirstStoragePool
  bin\VembuBDR.exe ChangeRepository X:/ D:/ SecondStoragePool
  1. If you have configured network drive as your backup repository, you have to run the above command by specifying the Storage Pool names.
Example: bin\VembuBDR.exe ChangeRepository //192.168.x.x/d$  //192.168.x.x/c$
Step 5:  Retrieve the list of configured storage pools:
  1. Open CMD and navigate to the PostgreSQL installation location.
  2. Run the command:
psql.exe -U postgres -p32010   
Note: If prompted for a password, type "admin" and press Enter.
  1. Enter the following commands:
\c SGDatabase
select repository_name from sg_chunk_repository_details where Global_repo_id in (0, -1);
Note: The above query will provide the PoolName.
Step 6: Completion and Server Start
Once the storage migration util process is completed, start the BDRSuite Backup server.
If difficulties arise during the implementation of these steps, please contact BDRSuite Support for assistance.