innobackupex fails with relative paths
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Confirmed
|
Medium
|
Unassigned | ||
2.2 |
Won't Fix
|
Undecided
|
Unassigned | ||
2.3 |
Confirmed
|
Medium
|
Unassigned |
Bug Description
innobackupex changes the current directory inside it, so if I give it BASEDIR and/or INCREMENTAL-DIR as relative paths:
# /usr/local/
.. , they become invalid & innobackupex outputs smth like:
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.
150317 17:58:02 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!".
150317 17:58:02 innobackupex: Starting ibbackup with command: xtrabackup --defaults-
xtrabackup version 2.2.6 based on MySQL server 5.6.21 FreeBSD9.1 (amd64) (revision id: )
incremental backup from 649139193500 is enabled.
xtrabackup: cd to /var/backup/
xtrabackup: This target seems to be already prepared.
2015-03-17 17:58:02 803007400 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 all-2015-
2015-03-17 17:58:02 803007400 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 all-2015-
xtrabackup: Error: xtrabackup_
innobackupex: got a fatal error with the following stacktrace: at /usr/local/
main::apply_log() called at /usr/local/
innobackupex: Error:
innobackupex: ibbackup failed at /usr/local/
Maybe, input paths should be expanded with realpath command.
Verified with 2.2.9. While prepare incremental , innobackupex fails with relative path.
root@desktop: /home/nilnandan /backup# xtrabackup --version /home/nilnandan /backup#
xtrabackup version 2.2.9 based on MySQL server 5.6.22 Linux (x86_64) (revision id: )
root@desktop:
root@desktop: /home/nilnandan /backup# ll 21_13-29- 07/ 21_13-35- 26/ 21_13-38- 29/ /home/nilnandan /backup#
total 32
drwxrwxr-x 5 nilnandan nilnandan 4096 Mar 21 13:38 ./
drwx------ 43 nilnandan nilnandan 16384 Mar 21 13:28 ../
drwxr-xr-x 6 root root 4096 Mar 21 13:30 2015-03-
drwxr-xr-x 6 root root 4096 Mar 21 13:39 2015-03-
drwxr-xr-x 6 root root 4096 Mar 21 13:38 2015-03-
root@desktop:
root@desktop: /home/nilnandan /backup# innobackupex --apply-log --redo-only 2015-03-21_13-35-26 --incremental- dir=2015- 03-21_13- 38-29
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://
150321 13:40:52 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!".
150321 13:40:52 innobackupex: Starting ibbackup with command: xtrabackup --defaults- file="/ home/nilnandan/ backup/ 2015-03- 21_13-35- 26/backup- my.cnf" --defaults- group=" mysqld" --prepare --target- dir=/home/ nilnandan/ backup/ 2015-03- 21_13-35- 26 --apply-log-only --incremental- dir=2015- 03-21_13- 38-29
xtrabackup version 2.2.9 based on MySQL server 5.6.22 Linux (x86_64) (revision id: ) /backup/ 2015-03- 21_13-35- 26 21_13-38- 29/xtrabackup_ logfile. will try to find. 21_13-38- 29/xtrabackup_ logfile. init_temp_ log() failed. innobackupex line 2642. innobackupex line 1570 innobackupex line 2642. /home/nilnandan /backup#
incremental backup from 1687574 is enabled.
xtrabackup: cd to /home/nilnandan
xtrabackup: This target seems to be already prepared.
2015-03-21 13:40:52 7f19ebab6780 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 2015-03-
2015-03-21 13:40:52 7f19ebab6780 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 2015-03-
xtrabackup: Error: xtrabackup_
innobackupex: got a fatal error with the following stacktrace: at /usr/bin/
main::apply_log() called at /usr/bin/
innobackupex: Error:
innobackupex: ibbackup failed at /usr/bin/
root@desktop: