~sergei.glushchenko/percona-xtrabackup/xb21-bug1095551

« back to all changes in this revision

Viewing changes to innobackupex

  • Committer: Stewart Smith
  • Date: 2013-01-02 04:22:50 UTC
  • mfrom: (441.2.1 2.1)
  • Revision ID: stewart@flamingspork.com-20130102042250-1ncw11rh2ewug14i
Merge MariaDB support

Show diffs side-by-side

added added

removed removed

Lines of Context:
416
416
    }
417
417
 
418
418
 
419
 
    # backup .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files
 
419
    # backup non-InnoDB files and tables
420
420
    # (or finalize the backup by syncing changes if using rsync)
421
421
    backup_files(0);
422
422
 
1926
1926
    my @list;
1927
1927
    my $file;
1928
1928
    my $database;
1929
 
    my $wildcard = '*.{frm,MYD,MYI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}';
 
1929
    my $wildcard = '*.{frm,MYD,MYI,MAD,MAI,MRG,TRG,TRN,ARM,ARZ,CSM,CSV,opt,par}';
1930
1930
    my $rsync_file_list;
1931
1931
    my $operation;
1932
1932
    my $rsync_tmpfile_pass1 = "$option_tmpdir/xtrabackup_rsyncfiles_pass1";
1957
1957
    } else {
1958
1958
        $operation = "to backup";
1959
1959
    }
1960
 
    print STDERR "\n$now  $prefix Starting $operation .frm, .MRG, .MYD, .MYI,\n";
1961
 
    print STDERR "$prefix .TRG, .TRN, .ARM, .ARZ, .CSM, .CSV and .opt files in\n";
1962
 
    print STDERR "$prefix subdirectories of '$source_dir'\n";
 
1960
    print STDERR "\n$now  $prefix Starting $operation non-InnoDB tables and files\n";
 
1961
    print STDERR "$prefix in subdirectories of '$source_dir'\n";
1963
1962
    # loop through all database directories
1964
1963
    while (defined($database = readdir(DIR))) {
1965
1964
        my $print_each_file = 0;
1980
1979
 
1981
1980
        # copy files of this database
1982
1981
        opendir(DBDIR, "$source_dir/$database");
1983
 
        @list = grep(/\.(frm|MYD|MYI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par)$/, readdir(DBDIR)); 
 
1982
        @list = grep(/\.(frm|MYD|MYI|MAD|MAI|MRG|TRG|TRN|ARM|ARZ|CSM|CSV|opt|par)$/, readdir(DBDIR));
1984
1983
        closedir DBDIR;
1985
1984
        $file_c = @list;
1986
1985
        if ($file_c <= $backup_file_print_limit) {
2090
2089
        $operation = "backing up";
2091
2090
    }
2092
2091
    $now = current_time();
2093
 
    print STDERR "$now  $prefix Finished $operation .frm, .MRG, .MYD, .MYI, .TRG, .TRN, .ARM, .ARZ, .CSV, .CSM and .opt files\n\n";
 
2092
    print STDERR "$now  $prefix Finished $operation non-InnoDB tables and files\n\n";
2094
2093
 }
2095
2094
 
2096
2095
 
2478
2477
sub set_xtrabackup_version {
2479
2478
# Based on MySQL version choose correct binary
2480
2479
#  MySQL 5.1.* with InnoDB plugin - xtrabackup
 
2480
#  MariaDB 5.1.* - xtrabackup
 
2481
#  MariaDB 5.2.* - xtrabackup
 
2482
#  MariaDB 5.3.* - xtrabackup
2481
2483
#  Percona Server >= 11.0 - xtrabackup
2482
 
#  MySQL 5.5.* - xtrabackup_55 
 
2484
#  MySQL 5.5.* - xtrabackup_55
 
2485
#  MariaDB 5.5.* - xtrabackup_55
2483
2486
 
2484
2487
my @lines;
2485
2488
my $var_version = '';
2508
2511
if($var_version =~ m/5\.1\.\d/ and $var_innodb_version =~ m/1\.0\.\d+-(rel)?\d/){
2509
2512
        $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
2510
2513
}
 
2514
if($var_version =~ m/5\.2\.\d/){
 
2515
    $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
 
2516
}
 
2517
if($var_version =~ m/5\.3\.\d/){
 
2518
    $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup');
 
2519
}
2511
2520
if($var_version =~ m/5\.5\.\d/){
2512
2521
        $ibbackup_binary = ($win eq 1 ? 'xtrabackup.exe' : 'xtrabackup_55');
2513
2522
}
2633
2642
command makes a complete backup of all MyISAM and InnoDB tables and
2634
2643
indexes in all databases or in all of the databases specified with the
2635
2644
--databases option.  The created backup contains .frm, .MRG, .MYD,
2636
 
.MYI, .TRG, .TRN, .ARM, .ARZ, .CSM, CSV, .opt, .par, and InnoDB data and log files.
2637
 
The MY.CNF options file defines the location of the database.  This command
2638
 
connects to the MySQL server using the mysql client program, and runs
2639
 
xtrabackup as a child process.
 
2645
.MYI, .MAD, .MAI, .TRG, .TRN, .ARM, .ARZ, .CSM, CSV, .opt, .par, and
 
2646
InnoDB data and log files.  The MY.CNF options file defines the
 
2647
location of the database.  This command connects to the MySQL server
 
2648
using the mysql client program, and runs xtrabackup as a child
 
2649
process.
2640
2650
 
2641
2651
The --apply-log command prepares a backup for starting a MySQL
2642
2652
server on the backup. This command recovers InnoDB data files as specified