innobackupex incremental apply-log copies to wrong directory

Reported by Ryan Flint on 2012-05-22
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup
High
Alexey Kopytov
1.6
High
Alexey Kopytov
2.0
High
Alexey Kopytov
2.1
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.

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.

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.

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

Other bug subscribers