innobackupex incremental apply-log copies to wrong directory

Bug #1002688 reported by Ryan Flint
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
Fix Released
High
Alexey Kopytov
1.6
Fix Released
High
Alexey Kopytov
2.0
Fix Released
High
Alexey Kopytov
2.1
Fix Released
High
Alexey Kopytov

Bug Description

When running the first --apply-log on my incremental backup, innobackupex copies the files to the wrong directory. My backup is located in /innobackupex/basedir/ with various databases as the subfolders such as /innobackupex/basedir/db1/, /innobackupex/basedir/db2/ etc. After running apply-log, I end up with folders in my /innobackupex/ directory such as /innobackupex/basedirdb1/ and /innobackupex/basedirdb2/ with the corresponding .frm and MyISAM files for each database. It appears to be stripping the directory separator between the basedir and the database.

Tags: innobackupex

Related branches

Revision history for this message
Ryan Flint (pinnaclecomps) wrote :

I did a bit of digging through the source code and in the copy_file() function, $copy_dir_src ends with a directory separator while $copy_dir_dst does not have the separator at the end.

Revision history for this message
Alexey Kopytov (akopytov) wrote :

Verified by changing the bug759701.sh test like this:

--- test/t/bug759701.sh 2011-12-21 16:40:27 +0000
+++ test/t/bug759701.sh 2012-05-22 13:48:07 +0000
@@ -37,7 +37,7 @@
 innobackupex --apply-log --redo-only $full_backup_dir
 vlog "Log applied to full backup"

-innobackupex --apply-log --redo-only --incremental-dir=$inc_backup_dir \
+innobackupex --apply-log --redo-only --incremental-dir=$inc_backup_dir/ \
     $full_backup_dir
 vlog "Delta applied to full backup"

So the bug occurs when the path in --incremental-dir ends with a slash.

The workaround is to remove the trailing slash from the --incremental-dir argument.

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXB-332

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.