Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mAster-rAdio/2868271 to your computer and use it in GitHub Desktop.
Save mAster-rAdio/2868271 to your computer and use it in GitHub Desktop.
percona-xtrabackup-2.0.0版
--- innobackupex.org 2012-04-04 03:49:34.000000000 +0900
+++ innobackupex 2012-06-04 22:08:17.000000000 +0900
@@ -1322,10 +1322,19 @@
print FILE "CHANGE MASTER TO MASTER_LOG_FILE='$filename', MASTER_LOG_POS=$position\n";
close(FILE);
+ my $orig_datadir = get_option(\%config, 'mysqld', 'datadir');
+
if ($option_stream) {
+ system("cd $orig_datadir; $stream_cmd master.info")
+ and Die "Failed to stream 'master.info': $!";
system("cd $option_tmpdir; $stream_cmd xtrabackup_slave_info")
and Die "Failed to stream 'xtrabackup_slave_info': $!";
unlink $slave_info || Die "Failed to delete '$slave_info': $!";
+ } else {
+ $src_name = escape_path("$orig_datadir/master.info");
+ $dst_name = escape_path("$backup_dir/");
+ system("$CP_CMD \"$src_name\" \"$dst_name\"")
+ and Die "Failed to copy file 'master.info': $!";
}
$mysql_slave_position = "master host '$master', filename '$filename', position $position";
@@ -2008,7 +2017,7 @@
# 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));
+ @list = grep(/\.(frm)|(MYD)|(MYI)|(MRG)|(TRG)|(TRN)|(ARM)|(ARZ)|(CSM)|(CSV)|(opt)|(par)|(SEN.*)$/, readdir(DBDIR));
closedir DBDIR;
$file_c = @list;
if ($file_c <= $backup_file_print_limit) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment