~sergei.glushchenko/percona-xtrabackup/bug489290_targetdir

« back to all changes in this revision

Viewing changes to innobackupex

merge feature: backup of LRU dump

Show diffs side-by-side

added added

removed removed

Lines of Context:
430
430
    # Close the DB connection
431
431
    mysql_close();
432
432
 
 
433
    # copy ib_lru_dump
 
434
    if (-e "$orig_datadir/ib_lru_dump") {
 
435
        if ($option_remote_host) {
 
436
            print STDERR "$prefix Backing up file 'ib_lru_dump'\n";
 
437
            system("scp $option_scp_opt '$orig_datadir/ib_lru_dump' '$option_remote_host:$backup_dir/ib_lru_dump'")
 
438
                and Die "Failed to scp file 'ib_lru_dump': $!";
 
439
        } elsif ($option_stream) {
 
440
            print STDERR "$prefix Backing up as tar stream 'ib_lru_dump'\n";
 
441
            system("cd $orig_datadir; tar chf - ib_lru_dump")
 
442
                and Die "Failed to stream 'ib_lru_dump': $!";
 
443
        } elsif (!$option_rsync) {
 
444
            my $src_name = escape_path("$orig_datadir/ib_lru_dump");
 
445
            my $dst_name = escape_path("$backup_dir/ib_lru_dump");
 
446
            system("$CP_CMD \"$src_name\" \"$dst_name\"")
 
447
                and Die "Failed to copy file 'ib_lru_dump': $!";
 
448
        }
 
449
    }
 
450
 
433
451
    if ($option_remote_host) {
434
452
        system("scp $option_scp_opt '$tmp_logfile' '$option_remote_host:$backup_dir/xtrabackup_logfile'")
435
453
            and Die "Failed to scp file '$option_remote_host:$backup_dir/xtrabackup_logfile': $!";
2118
2136
    closedir(DIR);
2119
2137
 
2120
2138
    if ($option_rsync) {
 
2139
        if (-e "$source_dir/ib_lru_dump") {
 
2140
            print RSYNC "ib_lru_dump\n";
 
2141
            if (!$prep_mode) {
 
2142
                $rsync_files_hash{"ib_lru_dump"} = 1;
 
2143
            }
 
2144
        }
2121
2145
        close(RSYNC);
2122
2146
 
2123
2147
        # do the actual rsync now