When there's no found my.cnf file, either /etc/ or given with --defaults-file option,
ex.
# innobackupex --copy-back /tmp/new/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
Get the latest version of Percona XtraBackup, documentation, and help resources: http://www.percona.com/xb/p
IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
innobackupex: Starting to copy files in '/tmp/new'
innobackupex: back to original data directory './'
innobackupex: Error: Failed to process file /tmp/new/ib_lru_dump: not overwriting file ./ib_lru_dump at /usr/bin/innobackupex line 2203.
XtraBackup routes to the path specified in the source of backup files, in that example, it's /tmp/new, as it's datadir path.
Since XtraBackup doesn't overwrite files then that error,
innobackupex: Error: Failed to process file /tmp/new/ib_lru_dump: not overwriting file ./ib_lru_dump at /usr/bin/innobackupex line 2203.
is triggered and thus, since ib_lru_dump file is the first listed file when XtraBackup copies the file by the system, then it shows that error.
Suggested Fix:
If no datadir is set, can we have instead say in the output log as, "XtraBackup can't detect datadir path. You need to have a config file, ideally /etc/my.cnf or use --defaults-file, else it'll route its datadir path to the source directory of your backup and could trigger error avoiding to overwrite files.."
When there's no found my.cnf file, either /etc/ or given with --defaults-file option,
ex.
# innobackupex --copy-back /tmp/new/
InnoDB Backup Utility v1.5.1-xtrabackup; Copyright 2003, 2009 Innobase Oy
and Percona LLC and/or its affiliates 2009-2013. All Rights Reserved.
This software is published under
the GNU GENERAL PUBLIC LICENSE Version 2, June 1991.
Get the latest version of Percona XtraBackup, documentation, and help resources: www.percona. com/xb/ p
http://
IMPORTANT: Please check that the copy-back run completes successfully.
At the end of a successful copy-back run innobackupex
prints "completed OK!".
innobackupex: Starting to copy files in '/tmp/new' ib_lru_ dump: not overwriting file ./ib_lru_dump at /usr/bin/ innobackupex line 2203.
innobackupex: back to original data directory './'
innobackupex: Error: Failed to process file /tmp/new/
XtraBackup routes to the path specified in the source of backup files, in that example, it's /tmp/new, as it's datadir path.
# ls -alth /tmp/new/ checkpoints binlog_ info
[root@localhost mysql]# ls -alth /tmp/new/
total 96M
drwxrwxrwt. 5 root root 4.0K Apr 3 05:33 ..
drwxr-xr-x 7 root root 4.0K Apr 3 05:17 .
drwxr-xr-x 2 root root 16K Apr 3 05:17 dbdtest
drwxr-xr-x 2 root root 20K Apr 3 05:17 sugarcrm
drwxr-xr-x 2 root root 4.0K Apr 3 05:17 mysql
drwxr-xr-x 2 root root 4.0K Apr 3 05:17 test
drwxr-xr-x 2 root root 4.0K Apr 3 05:17 performance_schema
-rw-r--r-- 1 root root 13 Apr 3 04:43 xtrabackup_binary
-rw-rw---- 1 root root 93 Apr 3 04:42 xtrabackup_
-rw-rw---- 1 root root 2.5K Apr 3 04:42 xtrabackup_logfile
-rw-rw---- 1 mysql mysql 128K Apr 3 04:42 ib_lru_dump
-rw-r--r-- 1 root root 29 Apr 3 04:42 xtrabackup_
-rw-r--r-- 1 root root 262 Apr 3 04:42 backup-my.cnf
-rw-rw---- 1 root root 18M Apr 3 04:39 ibdata1
Since XtraBackup doesn't overwrite files then that error,
innobackupex: Error: Failed to process file /tmp/new/ ib_lru_ dump: not overwriting file ./ib_lru_dump at /usr/bin/ innobackupex line 2203.
is triggered and thus, since ib_lru_dump file is the first listed file when XtraBackup copies the file by the system, then it shows that error.
Suggested Fix:
If no datadir is set, can we have instead say in the output log as, "XtraBackup can't detect datadir path. You need to have a config file, ideally /etc/my.cnf or use --defaults-file, else it'll route its datadir path to the source directory of your backup and could trigger error avoiding to overwrite files.."