Merge lp:~stewart/percona-xtrabackup/1.6-bug723318 into lp:percona-xtrabackup/1.6

Proposed by Stewart Smith
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 351
Proposed branch: lp:~stewart/percona-xtrabackup/1.6-bug723318
Merge into: lp:percona-xtrabackup/1.6
Diff against target: 31 lines (+17/-2)
1 file modified
innobackupex (+17/-2)
To merge this branch: bzr merge lp:~stewart/percona-xtrabackup/1.6-bug723318
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+135569@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) :
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 2012-11-19 02:12:39 +0000
3+++ innobackupex 2012-11-22 02:16:19 +0000
4@@ -276,10 +276,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