Data not Synchronize problem in xtrabackup backup

there are three existing servers (all mysql5.7 installed by centos7,):
br 10.19.6.6
BRV 192.168.3.101
CRAV 192.168.3.102

use xtrabackup to back up A"s MYSQL data, then restore to B
A"s database to deactivate, and B updates the primary database data normally.
then use B for full backup and restore to C"s database. At this time, it is found that the root password of mysql restored on C is actually A"s data password, and the latest data is still A"s data.

it is found that there are both innodb and myisam tables in the database. After recovery, you need to use mysqlcheck to repair before you can query normally


can I understand the above operation like this? a backup is transferred to B to recover data without master-slave replication; A closes the database; B backup is transferred to C for recovery without master-slave replication, and then it is found that there are n pieces of data on A that C does not have

xtrabackup when backing up, if it is an InnoDB table, the transaction backup will be started, and if the MySIAM table, the table backup will be locked, so that the backed up data is consistent with the time node when the backup starts

. The operation procedure of

An is as follows:

time point 1: start backup A
time point 2: data continue to be written A
time point 3: a backup is transferred to B restore
time point 4: close A write

The recovered data of

B is actually a data mirror of An at time point 1, so at the time point 4, the data of An is more than that of backup data, that is, the data of B is less than that of An in the middle of time points 1 to 4. The same is true for subsequent backup B to C restore.

xtrabackup is essentially a full backup, which of course includes mysql.user user table. After recovery, it will be A's data, so it is A's password on C

.

if you want to achieve data consistency, you only need to enable master-slave Synchronize after recovery

Menu