1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-11-06 08:49:29 +02:00

Fix for issue #80: enabling archive-copy causes failing differential & incremental backups

This commit is contained in:
David Steele
2015-05-22 14:49:14 -04:00
parent 5ada7fb5ad
commit d5335b40e8
8 changed files with 28 additions and 23 deletions

View File

@@ -1319,7 +1319,7 @@ sub BackRestTestBackup_RestoreCompare
}
# Generate the tablespace map for real backups
my %oTablespaceMap;
my $oTablespaceMap = undef;
# ${$oTablespaceMapRef}{oid}{$strName}{name} = $strName;
if (!$bSynthetic && defined(${$oExpectedManifestRef}{'backup:tablespace'}))
@@ -1327,10 +1327,8 @@ sub BackRestTestBackup_RestoreCompare
foreach my $strTablespaceName (keys(${$oExpectedManifestRef}{'backup:tablespace'}))
{
my $strTablespaceOid = ${$oExpectedManifestRef}{'backup:tablespace'}{$strTablespaceName}{link};
#
# confess "GOT HERE - $strTablespaceOid, $strTablespaceName";
$oTablespaceMap{oid}{$strTablespaceOid}{name} = $strTablespaceName;
$$oTablespaceMap{oid}{$strTablespaceOid}{name} = $strTablespaceName;
}
}
@@ -1338,7 +1336,7 @@ sub BackRestTestBackup_RestoreCompare
my $oActualManifest = new BackRest::Manifest("${strTestPath}/actual.manifest", false);
my $oTablespaceMapRef = undef;
$oActualManifest->build($oFile, ${$oExpectedManifestRef}{'backup:path'}{'base'}, $oLastManifest, $bSynthetic, \%oTablespaceMap);
$oActualManifest->build($oFile, ${$oExpectedManifestRef}{'backup:path'}{'base'}, $oLastManifest, true, $oTablespaceMap);
# Generate checksums for all files if required
# Also fudge size if this is a synthetic test - sizes may change during backup.
@@ -2306,7 +2304,7 @@ sub BackRestTestBackup_Test
$bRemote ? BACKUP : undef, # remote
$bCompress, # compress
undef, # checksum
$bRemote ? undef : true, # hardlink
$bRemote ? undef : false, # hardlink
$iThreadMax, # thread-max
$bArchiveAsync, # archive-async
undef); # compress-async
@@ -2318,7 +2316,7 @@ sub BackRestTestBackup_Test
$bRemote ? DB : undef, # remote
$bCompress, # compress
undef, # checksum
true, # hardlink
false, # hardlink
$iThreadMax, # thread-max
undef, # archive-async
undef); # compress-async

View File

@@ -941,6 +941,8 @@ sub BackRestTestCommon_ConfigCreate
{
$oParamHash{'global:backup'}{'hardlink'} = 'y';
}
$oParamHash{'global:backup'}{'archive-copy'} = 'y';
}
if (defined($bCompress) && !$bCompress)