# xtrabackup --prepare --apply-log-only --target-dir=/mysqldatabak/xtrabak/full_20220821 ... xtrabackup: Warning: cannot open ./xtrabackup_logfile. will try to find. InnoDB: Operating system error number 2 in a file operation. InnoDB: The error means the system cannot find the path specified. xtrabackup: Fatal error: cannot find ./xtrabackup_logfile. xtrabackup: Error: xtrabackup_init_temp_log() failed.
使用xtrabackup恢复数据库的时候,报错提示找不到xtrabackup_logfile。
去数据目录查看有xtrabackup_logfile.qp文件,就是xtrabackup备份的时候是压缩过的,需要先解压:
# xtrabackup --decompress --parallel=4 --target-dir=/mysqldatabak/xtrabak/full_20220821 ... sh: qpress: command not found cat: write error: Broken pipe Error: thread 0 failed.
好吧,看提示就是找不到qpress命令,找一个安装就好了:https://pkgs.org/search/?q=qpress
# wget https://repo.percona.com/yum/release/7/RPMS/x86_64/qpress-11-1.el7.x86_64.rpm # rpm -ivh qpress-11-1.el7.x86_64.rpm
好了!