If there is a major discrepancy between two servers (eg. Server1 is correct but Server2 is out), then sometimes the easiest way to restore the replication between them is to stop replication, delete the database of the one that is out of sync (in this example on Server2), take a snapshot of the correct database from Server1, then import it onto Server2 and restart the replication.
The easiest method, and best practice, is to stop the DualShield Server Service on both machines; however, this is not always an option, especially if access to services protected by MFA is required 24/7. Therefore there is another method where only one DualShield Server needs to be stopped, leaving at least the other DualShield online to continue authentication.
Most of our customers only have a two-node replication cluster (primary and secondary server) This Wiki is purely for the scenario that replication has stopped between two servers. If you have more than two DualShield Servers in an HA cluster then please contact support for assistance, as the fix for that is more complicated and will likely require a remote session with our team.
The database that is out of sync is on Server-2, therefore, you are going to take a snapshot of the database from Server-1, then restore the snapshot onto Server-2 and restart the replication.
On both Server1 and Server 2 machines, open a command prompt and change directory to C:\Program Files\Deepnet DualShield\mysql\bin
Log into MySQL console on both machines, and stop the slave service:
mysql -u root -p (Enter your password at prompt) mysql> use dualshield; mysql> stop slave; |
Open an elevated command prompt and change directory to C:\Program Files\Deepnet DualShield\mysql\bin
Copy and paste in the following command:
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:
mysql> reset slave; |
Stop the DualShield Server Service on server-2 only

Type the following query in the MySQL console to delete the current dualshield database:
mysql> drop database dualshield; |
Create a new database:
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:
mysql -u root -p DualShield < c:\path-to\backup.sql |