Merge lp:~percona-dev/percona-xtrabackup/bugs_787988_732318 into lp:percona-xtrabackup/2.0

Proposed by Alexey Kopytov
Status: Merged
Merged at revision: 259
Proposed branch: lp:~percona-dev/percona-xtrabackup/bugs_787988_732318
Merge into: lp:percona-xtrabackup/2.0
Diff against target: 31 lines (+17/-2)
1 file modified
innobackupex (+17/-2)
To merge this branch: bzr merge lp:~percona-dev/percona-xtrabackup/bugs_787988_732318
Reviewer Review Type Date Requested Status
Vadim Tkachenko Approve
Review via email: mp+62676@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Vadim Tkachenko (vadim-tk) wrote :

OK for me, assuming test passed

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-05-20 17:23:07 +0000
3+++ innobackupex 2011-05-27 14:01:04 +0000
4@@ -265,10 +265,25 @@
5 } else {
6 # make a backup of InnoDB and MyISAM tables, indexes and .frm files.
7 $ibbackup_exit_code = backup();
8- open XTRABACKUP_BINARY, "> $backup_dir/$xtrabackup_binary_file"
9- or die "Cannot open file $backup_dir/$xtrabackup_binary_file: $!\n";
10+ if ($option_remote_host) {
11+ open(XTRABACKUP_BINARY,
12+ "| ssh $option_remote_host 'cat > $backup_dir/$xtrabackup_binary_file'")
13+ || die "Failed to open file '$option_remote_host:$backup_dir/$xtrabackup_binary_file': $!";
14+ } elsif ($option_stream) {
15+ open XTRABACKUP_BINARY, "> $option_tmpdir/$xtrabackup_binary_file"
16+ || die "Cannot open file $option_tmpdir/$xtrabackup_binary_file: $!\n";
17+ } else {
18+ open XTRABACKUP_BINARY, "> $backup_dir/$xtrabackup_binary_file"
19+ || die "Cannot open file $backup_dir/$xtrabackup_binary_file: $!\n";
20+ }
21 print XTRABACKUP_BINARY $option_ibbackup_binary;
22 close XTRABACKUP_BINARY;
23+
24+ if ($option_stream) {
25+ system("cd $option_tmpdir; tar chf - $xtrabackup_binary_file")
26+ && die "Failed to stream $xtrabackup_binary_file: $!";
27+ unlink "$option_tmpdir/$xtrabackup_binary_file";
28+ }
29 }
30
31 $now = current_time();

Subscribers

People subscribed via source and target branches