Merge lp:~lachlan-mulcahy/percona-xtrabackup/1.7-bug859546 into lp:percona-xtrabackup/2.0

Proposed by Lachlan Mulcahy
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 320
Proposed branch: lp:~lachlan-mulcahy/percona-xtrabackup/1.7-bug859546
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 21 lines (+8/-1)
1 file modified
innobackupex (+8/-1)
To merge this branch: bzr merge lp:~lachlan-mulcahy/percona-xtrabackup/1.7-bug859546
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+77026@code.launchpad.net

Description of the change

Fix bug 859546 - Treat file not found (error code 2) as non-fatal when tar streaming non .ibd files in backup_files()

To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Looks good to me.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'innobackupex'
2--- innobackupex 2011-10-05 02:31:10 +0000
3+++ innobackupex 2011-10-05 17:43:27 +0000
4@@ -1873,9 +1873,16 @@
5 $ret = system("cd $source_dir; tar cf - $database/$file_name") >> 8;
6 if ($ret == 1) {
7 print STDERR "$prefix If you use GNU tar, this warning can be ignored.\n";
8+ # Check for non-zero exit code
9 } elsif ($ret != 0) {
10 print STDERR "$prefix tar returned with exit code $ret.\n";
11- Die "Failed to stream '$database/$file_name': $!";
12+ # Only treat as fatal cases where the file exists
13+ if ( -e "$database/$file_name" ) {
14+ Die "Failed to stream '$database/$file_name': $!";
15+ } else {
16+ print STDERR "$prefix Ignoring nonexistent file '$database/$file_name'.\n";
17+ }
18+
19 }
20 }
21 }

Subscribers

People subscribed via source and target branches