Restoring Your MySQL Databases (Windows)

QUESTION

How to restore Traverse Windows MySQL databases?

RESOLUTION

Requirements:

  1. These instructions are specifically for Windows Traverse installations
  2. These instructions will overwrite any existing data once you copy from the backup directories

 

Summary:

You will simply need to shut down Traverse components, then copy the directories under <TRAVERSE_HOME>\database\mysql to the specific BVE or DGE server. The instructions assumes the BVE servers and the DGE servers are split. In the case that you have a BVE+DGE combo, all the directories should apply on the same server. Once the backup files are copied over, run the commands to restore the databases. Following the commands should work whether you have a BVE+DGE combo or a split BVE and DGE.

 

Steps:

-Shut down Traverse components.

-Copy from <TRAVERSE_HOME>\database\backup\backup* to the following respective directories:
Applicable to BVE:
<TRAVERSE_HOME>\database\mysql\summarydb
<TRAVERSE_HOME>\database\mysql\schedulerdb
<TRAVERSE_HOME>\database\mysql\sladb
<TRAVERSE_HOME>\database\mysql\liveeventsdb

Applicable to DGE:
<TRAVERSE_HOME>\database\mysql\aggregateddatadb
<TRAVERSE_HOME>\database\mysql\processdb

 

-These commands are to restore the BVE MySQL databases:

cd <TRAVERSE_HOME>
net start nvdgedb


apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="liveeventsdb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" liveeventsdb >> logs\database_restore.log

apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="schedulerdb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" schedulerdb >> logs\database_restore.log

apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="summarydb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" summarydb >> logs\database_restore.log

apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="sladb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" sladb >> logs\database_restore.log

 

These commands are to restore the DGE MySQL databases:

cd <TRAVERSE_HOME>
net start nvdgedb


apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="aggregateddatadb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" aggregateddatadb >> logs\database_restore.log

apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="SHOW TABLES" --database="processdb" > tables.txt
for /F "skip=1" %G IN (tables.txt) DO @apps\mysql\bin\mysql --defaults-file=etc\mysql.conf --execute="REPAIR TABLE %G USE_FRM" processdb >> logs\database_restore.log

 

You may now turn on Traverse components

 

APPLIES TO 

All versions of Traverse.

REFERENCE

None.

 

Have more questions?

Contact us

Was this article helpful?
1 out of 1 found this helpful

Provide feedback for the Documentation team!

Browse this section