Mysql binlog incremental recovery

1. First restore the complete integrity

innobackupex --apply-log /mysql-auto-backup/2019-12-13_08-06-14/

 

2. Stop the mysql database first, and then delete the mysql directory file

rm /var/lib/mysql/* -rf 

3. Full recovery

innobackupex --copy-back /u01/2019-11-18_11-07-13/


4. Folder authorization mysql

chown -R mysql.mysql /data/mysql/


Application binlog recovery

Cat xtrabackup_binlog_info in the backup file

In this file there are the starting position and the file number of binlog

Find start-position and mysql-binlog

 

mysqlbinlog --start-position='187919314' /tmp/53log/mysql-binlog.000100|mysql -uroot -p password

Guess you like

Origin blog.csdn.net/weixin_41086692/article/details/103526138