Data recovery based on the full backup + binlog way

Based on the full backup to restore data + binlog way

The bkxt a recovery, with cmdb action from the full backup library on rescs5

Do the following all equipment after recovery

set global read_only=OFF; stop slave; reset slave all;

 

Pull the main library binlog file contents to see xtrabackup_slave_info

 

Pulled from the library's binlog see xtrabackup_binlog_info and xtrabackup_binlog_pos_innodb

 

 

 

This only takes to pull in the main database binlog

# scp mysql-bin.000012 10.10.228.163:/data/recover2019/

Analysis binlog find the end point position

/usr/local/mysql/bin/mysqlbinlog --no-defaults -vv --base64-output=DECODE-ROWS mysql-bin.000012 --start-datetime='2019-06-26 15:20:00' --stop-datetime='2019-06-26 15:50:00' > 20190626a.log

 

To position the point, for example 945 174 224

 

With recovery to the specified binlog position

/usr/local/mysql/bin/mysqlbinlog --no-defaults mysql-bin.000012 --start-position=918096986 --stop-position=945174224 |/usr/local/mysql/bin/mysql -ubluewhale -p -S /tmp/mysqld.5306_bkxttest.sock

 

Guess you like

Origin www.cnblogs.com/allenhu320/p/11317203.html