use*_*521 5 mysql backup percona percona-tools xtrabackup
我已经通过 PerconaXtrabackup 工具创建了一个 MySQL 备份(感谢本指南):
innobackupex --user=backupmysqluser --password=xyz --compress --stream=xbstream ./ > /var/backups/db/firstBackup.db
Run Code Online (Sandbox Code Playgroud)
它成功创建了热备份。现在我想测试它的恢复情况,所以,首先,我解压它:
cd /var/backups/db
mkdir decompressed
xbstream -x -C decompressed
Run Code Online (Sandbox Code Playgroud)
现在我试着准备它:
innobackupex --apply-log /var/backups/db/decompressed/
Run Code Online (Sandbox Code Playgroud)
结果是这个错误:
160719 20:06:28 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.3 based on MySQL server 5.7.11 Linux (x86_64) (revision id: 6a46905)
xtrabackup: cd to /var/backups/db/decompressed
xtrabackup: This target seems to be not prepared yet.
InnoDB: Number of pools: 1
InnoDB: Operating system error number 2 in a file operation.
InnoDB: The error means the system cannot find the path specified.
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.
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为在decompressed
文件夹中没有 xtrabackup_logfile,而是有一个名为的文件xtrabackup_logfile.qp
。
我做错了什么?
小智 5
如果 Xtrabackup 文件仍有.qp
扩展名,则您尚未解压缩它们。
尝试在当前文件夹中使用它:
sudo innobackeupex --decompress --parallel=4
Run Code Online (Sandbox Code Playgroud)
where4
代表您要使用的线程数。
此外,事后清理:
sudo find ${DEST_DIR}/ -name "*.qp" -delete
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
4293 次 |
最近记录: |