Skip to main content
Druva Documentation

How to move DB and/or DB logs for Bynamo Storage on inSync server running on Windows?

OS: Windows
Product edition: inSync On-Premise and inSync Cloud

 

Overview

inSync storage comprises of three components:

  • Data 
  • Database (DB)
  • Database logs (DBlogs) 

This article will guide you on how to move the DB and DBlogs to a new location.

Pre-requisites

Before you proceed with moving any of storage components, you need to perform the following checks:

  1. Get the server logs and perform a sanity check for storage to ensure the concerned inSync storage does not have any existing issues.
  2. From the System and Application event logs of server, verify that the server does not have any existing disk or NTFS issues. In case data is stored on SAN which is connected through iSCSI then check for related events as well.
  3. Get hardware details of the new location, including drive letters, where components are being moved and cross verify if the hardware matches our recommendations.

If all the pre-checks are satisfactory, you may proceed with the following steps to perform the migration part.

Move DB to another location

  1. Stop all the Druva inSync Services on the Server and ensure that all the inSync processes are exited.
  2. Complete Manual Bynamo Catastrophic recovery for concerned Storage. You may refer to Windows-Manual Bynamo Storage Recovery section for more information. 
  3. Add AV exclusions to the target DB location. Make sure this path or one of its parent is not shared and no third party app/utility is accessing files or taking lock from this location without VSS feature.
  4. Verify the size along with number of files and permissions of DB folder at the source location (take a screen capture if required) and copy the DB to the target location. 
  5. Verify the size along with number of files and permissions of DB folder at the target location.
  6. Open the Command prompt (as an administrator) and navigate to C:\Program Files\Druva\inSync Server\embeddedDB\bin>.
  7. Run a following command to start inSyncConfigDBServer.exe :
    inSyncConfigDBServer.exe --defaults-file="C:\Program Files\Druva\inSync Server\embeddedDB\inSyncDB.ini" --basedir="C:\Program Files\Druva\inSync Server\embeddedDB"
  8. Minimize the command prompt and open a new command prompt (as an administrator) and navigate to C:\Program Files\Druva\inSync Server\embeddedDB\bin>
  9. Run a following command to connect to MySQL.
    inSyncConfigDBClient.exe -h127.0.0.1 -P 6075 -uroot -pinSyncConfigDB
  10. Connect to insynconfigdb database and update the storage by running following command:
    Update storage set dbpath=”<New dbpath>” where id=”<StorageID>”;
    For example if new DB path is C:\Storage\Storage1\DB and Storage ID is 1, then the command must be as follows:
    Update storage set dbpath=” C:/Storage/Storage1/DB” where id=1;
    Note: In insyncconfigdb backward slash (\) should be replaced by forward slash (/).
  11. Verify the updated storage path by running following command and output should reflect new paths.
    Select id, name, dbpath, from storage;
  12. Start the Druva inSync Services.

Move DB logs to another location

  1. Stop all the Druva inSync services on the server and ensure that all the inSync processes are exited.
  2. Verify the size along with number of files and permissions of DB logs folder at the source location. (Take a screen capture if required.) 
  3. Add AV exclusions to the new target DB Logs location. Make sure this path or one of its parent is not shared and no third party app/utility is accessing files or taking lock from this location without VSS feature.
  4. Copy the DB logs to the target location. 
  5. Verify the size along with number of files and permissions of DB logs folder at the target location. (Take a screen capture if required.) 
  6. We would need to update the location for __bynamolog___ folder in DB_CONFIG file (line with "set_lg_dir <path to __bynamolog___>"). For this, open __bynamodb___folder, take a backup of the file DB_CONFIG and update the location.
  7. Save the changes and close the file.
  8. Open the Command prompt (as administrator) and navigate to C:\Program Files\Druva\inSync Server\embeddedDB\bin>.
  9. Run the following command to start inSyncConfigDBServer.exe.
    inSyncConfigDBServer.exe --defaults-file="C:\Program Files\Druva\inSync Server\embeddedDB\inSyncDB.ini" --basedir="C:\Program Files\Druva\inSync Server\embeddedDB"
  10. Open a new command prompt window (as administrator) and navigate to C:\Program Files\Druva\inSync Server\embeddedDB\bin>.
  11. Run the following command to connect to MySQL.
    inSyncConfigDBClient.exe -h127.0.0.1 -P 6075 -uroot -pinSyncConfigDB.
  12. Connect to insynconfigdb database and update the storage by running following command
    Update storage set dblogpath=”<New dblogpath>” where id=”StorageID”;
    For example:
    If new dblogpath is C:\Storage\Storage1\DBlogs and Storage ID is 1, then command should be as follows:
    Update storage set dblogpath= “C:/Storage/Storage1/DBlogs” where id=1;
    Note: In insyncconfigdb backward slash (\) should be replaced by forward slash (/).
  13. Verify the updated storage path by running following command and output should reflect new paths.
    Select id, name, dblogpath, from storage;
  14. Start the Druva inSync Services.