1:innobackupex version 2.4.11 此版本的备份工具有相关改动,直接把innobackupex 改为xtrabackup进行备份还原了,可以直接使用innobackupex及相关参数备份,但是在还原的时候如果使用innobackupex的话在还原增量备份会报错,信息如下 2:[root@mysql-userconlogin-192 work]# innobackupex --apply-log 2019-12-03_00-00-01_full/ --incremental-dir=2019-12-05_00-00-01_incr/ 191205 16:39:03 innobackupex: Starting the apply-log operation IMPORTANT: Please check that the apply-log run completes successfully. At the end of a successful apply-log run innobackupex prints "completed OK!". innobackupex version 2.4.11 based on MySQL server 5.7.19 Linux (x86_64) (revision id: b4e0db5) incremental backup from 163753991362 is enabled. xtrabackup: cd to /home/work/2019-12-03_00-00-01_full/ xtrabackup: This target seems to be already prepared. xtrabackup: error: applying incremental backup needs target prepared with --apply-log-only. 此时需要使用xtrabackup进行还原并且此错误只有在使用增量还原时出现,如果是只是还原全备的情况是没有问题的 3:还原 #先prepare全备 xtrabackup --prepare --apply-log-only --target-dir=/home/zhoujy/xtrabackup/ #再prepare增量备份 xtrabackup --prepare --apply-log-only --target-dir=/home/zhoujy/xtrabackup/ --incremental-dir=/home/zhoujy/xtrabackup1/ 4:最后prepare 全备 xtrabackup --prepare --target-dir=/home/zhoujy/xtrabackup/ 5:copy xtrabackup --copy-back --target-dir=2019-12-03_00-00-01_full/ 或 move xtrabackup --move-back --target-dir=2019-12-03_00-00-01_full/ 6:赋权 chown -R mysql:mysql /home/work/mysql