-
-
Save mAster-rAdio/5813254 to your computer and use it in GitHub Desktop.
Revisions
-
mAster-rAdio revised this gist
Jun 19, 2013 . 2 changed files with 40 additions and 31 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,31 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,40 @@ --- innobackupex.orig 2013-05-23 03:50:09.000000000 +0900 +++ innobackupex 2013-06-19 19:15:00.000000000 +0900 @@ -1593,10 +1593,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': $!"; stream_encrypt_file($option_tmpdir, "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"; @@ -2195,7 +2204,7 @@ my @list; my $file; my $database; - my $wildcard = '*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}'; + my $wildcard = '*.{frm,isl,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par,SEN.*}'; my $rsync_file_list; my $operation; my $rsync_tmpfile_pass1 = "$option_tmpdir/xtrabackup_rsyncfiles_pass1"; @@ -2248,7 +2257,7 @@ # copy files of this database opendir(DBDIR, "$source_dir/$database"); - @list = grep(/\.(frm|isl|MYD|MYI|MAD|MAI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par)$/, readdir(DBDIR)); + @list = grep(/\.(frm|isl|MYD|MYI|MAD|MAI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par|SEN.*)$/, readdir(DBDIR)); closedir DBDIR; $file_c = @list; if ($file_c <= $backup_file_print_limit) { -
kamipo revised this gist
Jan 6, 2011 . 2 changed files with 31 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +0,0 @@ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ --- innobackupex-1.5.1.org 2010-12-09 23:03:09.000000000 +0900 +++ innobackupex-1.5.1 2011-01-07 01:28:20.000000000 +0900 @@ -1333,10 +1333,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 eq 'tar') { + system("cd $orig_datadir; tar chf - master.info") + and Die "Failed to stream 'master.info': $!"; system("cd $option_tmpdir; tar chf - 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"; @@ -1989,7 +1998,7 @@ # copy files of this database opendir(DBDIR, "$source_dir/$database"); - @list = grep(/\.(frm)|(MYD)|(MYI)|(MRG)|(TRG)|(TRN)|(ARM)|(ARZ)|(opt)|(par)$/, readdir(DBDIR)); + @list = grep(/\.(frm)|(MYD)|(MYI)|(MRG)|(TRG)|(TRN)|(ARM)|(ARZ)|(opt)|(par)|(SEN.*)$/, readdir(DBDIR)); closedir DBDIR; $file_c = @list; if ($file_c <= $backup_file_print_limit) { -
kamipo created this gist
Jan 6, 2011 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ --- innobackupex-1.5.1.org 2010-12-09 23:03:09.000000000 +0900 +++ innobackupex-1.5.1 2011-01-06 20:00:04.000000000 +0900 @@ -1989,7 +1989,7 @@ # copy files of this database opendir(DBDIR, "$source_dir/$database"); - @list = grep(/\.(frm)|(MYD)|(MYI)|(MRG)|(TRG)|(TRN)|(ARM)|(ARZ)|(opt)|(par)$/, readdir(DBDIR)); + @list = grep(/\.(frm)|(MYD)|(MYI)|(MRG)|(TRG)|(TRN)|(ARM)|(ARZ)|(opt)|(par)|(SEN.*)$/, readdir(DBDIR)); closedir DBDIR; $file_c = @list; if ($file_c <= $backup_file_print_limit) {