I’m attempting to restore a .tar.gz backup file created by xtrabackup on a different (but identical) server- but the process of restoring is not clear to me. This is what my config looks like:
innobackupex --version
InnoDB Backup Utility v1.5.1-xtrabackup
xtrabackup version 2.2.13 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 70f4be3)
source server:
/etc/holland/holland.conf -------------------------------------------------------------
[holland]
plugin_dirs = /usr/share/holland/plugins
backup_directory = /efs/sip
backupsets = xtrabackup
umask = 0007
path = /usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
[logging]
filename = /var/log/holland/holland.log
level = debug
/etc/holland/providers/xtrabackup.conf ---------------------------------------------
[holland:backup]
backups-to-keep = 1
estimated-size-factor = 1.0
plugin = xtrabackup
[xtrabackup]
innobackupex = innobackupex
stream = yes
slave-info = no
[compression]
method = gzip
inline = yes
level = 4
[mysql:client]
defaults-extra-file = /root/.my.cnf
socket=/mnt/db/mysql/mysql.sock
/etc/holland/backupsets/xtrabackup.conf --------------------------------------------
[holland:backup]
plugin = xtrabackup
backups-to-keep = 7
auto-purge-failures = yes
purge-policy = before-backup
estimated-size-factor = 0.05
[xtrabackup]
global-defaults = /etc/my.cnf
innobackupex = innobackupex
stream = tar
apply-logs = yes
slave-info = yes
safe-slave-backup = no
no-lock = no
additional-options = ,
[compression]
method = pigz
inline = yes
options = “-p8”
level = 4
[mysql:client]
defaults-extra-file = /root/.my.cnf,
The resulting backup files are .tar.gz (which appear to be compressed with pigz not gzip) files- I am then attempting to restore these backups on the destination server (which is a clone of the source server)- but it’s not exactly clear to me as to what the process is here
destination server:
backupfile location: /from_prod/
desired mysql data folder location: /mnt/db/
my attempt to prepare/restore the backup:
xtrabackup --prepare --target-dir=/mnt/db/mysql/
xtrabackup version 2.2.13 based on MySQL server 5.6.24 Linux (x86_64) (revision id: 70f4be3)
xtrabackup: cd to /mnt/db/mysql/
xtrabackup: Error: cannot open ./xtrabackup_checkpoints
xtrabackup: error: xtrabackup_read_metadata()
xtrabackup: This target seems not to have correct metadata…
2019-02-04 16:44:51 7f1ce1af1720 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.
2019-02-04 16:44:51 7f1ce1af1720 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.