Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagesql
themeEmacs
mysql -u root -p

(Enter your password at prompt)

mysql> use dualshield;

mysql> stop slave;


Take a snapshot of the database on Server-1

Open an elevated command prompt and change directory to C:\Program Files\Deepnet DualShield\mysql\bin

Copy and paste in the following command:

Code Block
languagesql
themeEmacs
mysqldump -uroot -p --skip-lock-tables --single-transaction --flush-logs --hex-blob --master-data=2 dualshield > c:\path-to\backup.sql

(The path and backup file name can be modified as required)

Hit return and enter the password when prompted.  Hit return again.  The process may take a few minutes, but when you see the curser again, it means the snapshot has been taken.

Type the following to reset slave:

Code Block
languagesql
themeEmacs
mysql> reset slave;



Restore the snapshot to Server-2

Stop the DualShield Server Service on server-2 only

Image Added


Type the following query in the MySQL console to delete the current dualshield database: 

Code Block
languagesql
themeEmacs
mysql> drop database dualshield;


Create a new database:

Code Block
languagesql
themeEmacs
mysql> create database dualshield CHARACTER SET utf8 COLLATE utf8_general_ci;


Import the database you copied over from Server-1.

Open an elevated command prompt and change directory to C:\Program Files\Deepnet DualShield\mysql\bin

Type the command:

Code Block
languagesql
themeEmacs
mysql -u root -p DualShield < c:\path-to\backup.sql