innobackupex silently ignores databases it cannot open

Bug #1054441 reported by Jaime Sicam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraBackup moved to https://jira.percona.com/projects/PXB
New
Undecided
Unassigned

Bug Description

If innobackupex does not have permission to open a subdirectory of /var/lib/mysql (but does have permission to open /var/lib/mysql itself) it creates an empty directory in the backup and says that it completed OK. It should fail in this case.

The following patch identifies the line that should be checking for an error:

*** innobackupex~ Fri Sep 21 22:12:47 2012
--- innobackupex Fri Sep 21 22:23:50 2012
***************
*** 1995,2001 ****
}

# copy files of this database
! opendir(DBDIR, "$source_dir/$database");
@list = grep(/\.(frm|MYD|MYI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par)$/, readdir(DBDIR));
closedir DBDIR;
$file_c = @list;
--- 1995,2001 ----
}

# copy files of this database
! opendir(DBDIR, "$source_dir/$database") || die "Cannot open database directory $source_dir/$database: $!";
@list = grep(/\.(frm|MYD|MYI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par)$/, readdir(DBDIR));
closedir DBDIR;
$file_c = @list;

This patch is insufficient since it does not kill the xtrabackup subprocess running during this code, but it shows where the check ought to be inserted.

Tags: i26401
Jaime Sicam (jssicam)
tags: added: i26401
Revision history for this message
Alexey Kopytov (akopytov) wrote :

This is a duplicate of bug #664986.

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.