Percona: Backup preparation doesn't work (“cannot open ./xtrabackup_logfile”)
-
02-10-2020 - |
Question
I've created a MySQL backup with PerconaXtrabackup tool via (thanks to this guide):
innobackupex --user=backupmysqluser --password=xyz --compress --stream=xbstream ./ > /var/backups/db/firstBackup.db
It succeeds creating the hot backup. Now I want to test the restoration of it, so then, first, I decompress it:
cd /var/backups/db
mkdir decompressed
xbstream -x -C decompressed
Now I try to prepare it:
innobackupex --apply-log /var/backups/db/decompressed/
And the result is this error:
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.
It's strange because in the decompressed
folder there's no xtrabackup_logfile, but there is a file named xtrabackup_logfile.qp
instead.
What did I do wrong?
Solution
You have not decompressed the Xtrabackup files if they still have the .qp
extension.
Try using this inside the current folder:
sudo innobackeupex --decompress --parallel=4
where 4
stands for the number of threads you would like to use.
Also, for clean-up afterwards:
sudo find ${DEST_DIR}/ -name "*.qp" -delete
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange