Skip to content

Commit

Permalink
fixing bug which caused failure of restore of incremental backup it r…
Browse files Browse the repository at this point in the history
…esulted to append --incremental-dir twice
  • Loading branch information
[email protected] committed Nov 19, 2015
1 parent e6f7223 commit a21b1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Backup/Type/Incremental.pm
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ sub restore_common {
# we apply each incremental backup from oldest to newest on full backup
my $restoreIncrCmd = "innobackupex --apply-log --redo-only " . $restoreLocation . " --incremental-dir=";

$restoreIncrCmd .= $tmpRestoreLoc;

for my $prevBkp(@$chain) {

my @files = glob($params{'hostBkpDir'} . "/*/" . $prevBkp->{'uuid'} . ".xb." . $compSuffix);
Expand All @@ -298,8 +300,6 @@ sub restore_common {
}; # try

$self->log('base')->info("Incremental backup in dir $1 and uuid " . $prevBkp->{'uuid'});

$restoreIncrCmd .= $tmpRestoreLoc;

try{
$result = $shell->execCmd('cmd' => $restoreIncrCmd, 'cmdsNeeded' => [ 'innobackupex' ]);
Expand Down

0 comments on commit a21b1d4

Please sign in to comment.