Not the answer you need?
Register and ask your own question!

Can't restore backup with absolute innodb_data_file_path

PasoPaso EntrantInactive User Role Novice
Hi,
I have a server configuration where I have the mysql files placed on two different disk arrays, /opt/mysql which is a RAID10 over 15kRPM disks, and /var/lib/mysql which is a RAID1 on S3710 SSDs. When atempting to restore a xtrabackup backup it fails as it interprets the my.cnf params differently than mysql, from what I can tell. Does anyone know of a simple workaround for this problem?
root@jed:/opt/mysql-dump-20160704# cat /etc/apt/sources.list.d/percona.list 
# percona
deb http://repo.percona.com/apt xenial main
deb-src http://repo.percona.com/apt xenial main

root@jed:/opt/mysql-dump-20160704# grep data /etc/mysql/my.cnf
datadir                        = /var/lib/mysql/
innodb_data_home_dir           =
innodb_data_file_path          = /opt/mysql/ibdata1:10M:autoextend:max:10G

root@jed:/opt/mysql-dump-20160704# innobackupex --copy-back .
160705 10:14:45 innobackupex: Starting the copy-back operation

IMPORTANT: Please check that the copy-back run completes successfully.
           At the end of a successful copy-back run innobackupex
           prints "completed OK!".

innobackupex version 2.3.4 based on MySQL server 5.6.24 Linux (x86_64) (revision id: e80c779)
160705 10:14:45 [01] Copying ib_logfile0 to /opt/mysql/ib_logfile0
160705 10:14:55 [01]        ...done
160705 10:14:55 [01] Copying ib_logfile1 to /opt/mysql/ib_logfile1
160705 10:15:08 [01]        ...done
innobackupex: Can't create directory [B]'/var/lib/mysql/opt/mysql/'[/B] (Errcode: 2 - No such file or directory)
[01] error: cannot open the destination stream for ibdata1
[01] Error: copy_file() failed.

Regards,
Patrik

Comments

  • PasoPaso Entrant Inactive User Role Novice
    This bug is still present in the latest version of xtrabackup (2.4.4) but I managed to work around it by removing the dir from innodb_data_file_path in /etc/mysql/my.cnf and /backupdir/backup-my.cnf (eg. setting innodb_data_file_path = ibdata1:10M:autoextend:max:10G) , doing the copy-back and then manually moving the files and restoring the my.cnf.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.