pgbackrest.git / summary / log / commit / refs
commit b620e6b282d3fc0bd1354b9490fbd84ee8d22d6e
Author: Cynthia Shang <cynthia.shang@crunchydata.com>
Commit: David Steele <david@pgmasters.net>
Date: Thu Apr 06 23:36:37 2017 +0000
Improvements and additional tests for stanza-upgrade.
Contributed by Cynthia Shang.
doc/xml/user-guide.xml | 55 ++++----
lib/pgBackRest/Backup.pm | 65 +++++-----
lib/pgBackRest/BackupInfo.pm | 64 +++++++++-
lib/pgBackRest/Expire.pm | 23 ++--
test/expect/expire-expire-001.log | 32 ++---
test/expect/expire-expire-002.log | 138 ++++++++++++++++++++-
test/expect/full-synthetic-001.log | 36 +++---
test/expect/full-synthetic-002.log | 36 +++---
test/expect/full-synthetic-003.log | 36 +++---
test/expect/full-synthetic-004.log | 36 +++---
test/expect/full-synthetic-005.log | 36 +++---
test/expect/full-synthetic-006.log | 36 +++---
test/expect/full-synthetic-007.log | 36 +++---
test/expect/full-synthetic-008.log | 36 +++---
test/expect/stanza-upgrade-001.log | 11 +-
test/expect/stanza-upgrade-002.log | 11 +-
.../pgBackRestTest/Backup/BackupInfoUnitTest.pm | 104 ++++++++++++++++
test/lib/pgBackRestTest/Common/DefineTest.pm | 5 +
test/lib/pgBackRestTest/Expire/ExpireExpireTest.pm | 5 +
test/lib/pgBackRestTest/Stanza/StanzaUnitTest.pm | 2 +-
.../lib/pgBackRestTest/Stanza/StanzaUpgradeTest.pm | 11 +-
21 files changed, 560 insertions(+), 254 deletions(-)
diff --git a/doc/xml/user-guide.xml b/doc/xml/user-guide.xml
index 3541fee22..6bc3cc331 100644
--- a/doc/xml/user-guide.xml
+++ b/doc/xml/user-guide.xml
@@ -2116,10 +2116,10 @@
</execute>
</execute-list>
- <p>Stop the old cluster on the standby since it will be restored from the newly upgraded cluster to ensure the database system id is identical on both the master and standby. Install the new <postgres/> binaries on the standby and create the cluster.</p>
+ <p>Stop the old cluster on the standby since it will be restored from the newly upgraded cluster to ensure the database system id is identical on both the master and standby.</p>
<execute-list host="{[host-db-standby]}">
- <title>Stop old cluster</title>
+ <title>Stop old cluster and drop default cluster if created</title>
<execute user="root">
<exe-cmd>{[db-cluster-stop]}</exe-cmd>
@@ -2133,16 +2133,6 @@
<execute user="root" keyword="default">
<exe-cmd>pg_dropcluster {[pg-version-upgrade]} main</exe-cmd>
</execute>
-
- <execute user="postgres" keyword="default">
- <exe-cmd>
- /usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb
- -D {[db-path-upgrade]} -k -A peer</exe-cmd>
- </execute>
-
- <execute user="root" output="y" filter="n">
- <exe-cmd>{[db-cluster-create-upgrade]}</exe-cmd>
- </execute>
</execute-list>
<p>Stop the old cluster on the master and perform the upgrade.</p>
@@ -2271,7 +2261,7 @@
</execute>
</execute-list>
- <p>Remove the old clusters.</p>
+ <p>Remove the old cluster.</p>
<execute-list host="{[host-db-master]}">
<title>Remove old cluster</title>
@@ -2285,8 +2275,20 @@
</execute>
</execute-list>
+ <p>Run a full backup on the new cluster and then restore the standby from the backup. The backup type will automatically be changed to <id>full</id> if <id>incr</id> or <id>diff</id> is requested.</p>
+
+ <execute-list host="{[host-backup]}">
+ <title>Run a full backup</title>
+
+ <execute user="backrest">
+ <exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-type=full backup</exe-cmd>
+ </execute>
+ </execute-list>
+
+ <p>Install the new <postgres/> binaries on the standby and create the cluster.</p>
+
<execute-list host="{[host-db-standby]}">
- <title>Remove old cluster</title>
+ <title>Remove old cluster and initialize new one</title>
<execute keyword="default" user="root">
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
@@ -2295,15 +2297,15 @@
<execute keyword="co6" user="root">
<exe-cmd>rm -rf {[db-path]}</exe-cmd>
</execute>
- </execute-list>
-
- <p>Run a full backup on the new cluster and then restore the standby from the backup.</p>
- <execute-list host="{[host-backup]}">
- <title>Run a full backup</title>
+ <execute user="postgres" keyword="default">
+ <exe-cmd>
+ /usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb
+ -D {[db-path-upgrade]} -k -A peer</exe-cmd>
+ </execute>
- <execute user="backrest">
- <exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-type=full backup</exe-cmd>
+ <execute user="root" output="y" filter="n">
+ <exe-cmd>{[db-cluster-create-upgrade]}</exe-cmd>
</execute>
</execute-list>
@@ -2319,17 +2321,6 @@
<title>Configure <postgres/></title>
<postgres-config-option key="hot_standby">on</postgres-config-option>
- <postgres-config-option key="port">5432</postgres-config-option>
- </postgres-config>
-
- <postgres-config host="{[host-db-standby]}" file="{[postgres-config-demo-upgrade]}" show="n">
- <title>Configure <postgres/></title>
-
- <postgres-config-option key="log_filename">'postgresql.log'</postgres-config-option>
- <postgres-config-option key="log_line_prefix">''</postgres-config-option>
- <postgres-config-option key="ssl" keyword="default">true</postgres-config-option>
- <postgres-config-option key="ssl_cert_file" keyword="default">'/etc/ssl/certs/ssl-cert-snakeoil.pem'</postgres-config-option>
- <postgres-config-option key="ssl_key_file" keyword="default">'/etc/ssl/private/ssl-cert-snakeoil.key'</postgres-config-option>
</postgres-config>
<execute-list host="{[host-db-standby]}">
diff --git a/lib/pgBackRest/Backup.pm b/lib/pgBackRest/Backup.pm
index 0ad63d4b9..d6af6e862 100644
--- a/lib/pgBackRest/Backup.pm
+++ b/lib/pgBackRest/Backup.pm
@@ -488,6 +488,36 @@ sub process
# Declare the backup manifest
my $oBackupManifest = new pgBackRest::Manifest($strBackupConfFile, false);
+ # Initialize database objects
+ my $oDbMaster = undef;
+ my $oDbStandby = undef;
+
+ # Get the database objects
+ ($oDbMaster, $self->{iMasterRemoteIdx}, $oDbStandby, $self->{iCopyRemoteIdx}) = dbObjectGet();
+
+ # If remote copy was not explicitly set then set it equal to master
+ if (!defined($self->{iCopyRemoteIdx}))
+ {
+ $self->{iCopyRemoteIdx} = $self->{iMasterRemoteIdx};
+ }
+
+ # Initialize the master file object
+ my $oFileMaster = new pgBackRest::File
+ (
+ optionGet(OPTION_STANZA),
+ optionGet(OPTION_REPO_PATH),
+ protocolGet(DB, $self->{iMasterRemoteIdx})
+ );
+
+ # Determine the database paths
+ my $strDbMasterPath = optionGet(optionIndex(OPTION_DB_PATH, $self->{iMasterRemoteIdx}));
+ my $strDbCopyPath = optionGet(optionIndex(OPTION_DB_PATH, $self->{iCopyRemoteIdx}));
+
+ # Database info
+ my ($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId) = $oDbMaster->info();
+
+ my $iDbHistoryId = $oBackupInfo->check($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId);
+
# Find the previous backup based on the type
my $oLastManifest;
my $strBackupLastPath;
@@ -496,7 +526,8 @@ sub process
{
$strBackupLastPath = $oBackupInfo->last($strType eq BACKUP_TYPE_DIFF ? BACKUP_TYPE_FULL : BACKUP_TYPE_INCR);
- if (defined($strBackupLastPath))
+ # If there is a prior backup and it is for the current database, then use it as base
+ if (defined($strBackupLastPath) && $oBackupInfo->confirmDb($strBackupLastPath, $strDbVersion, $ullDbSysId))
{
$oLastManifest = new pgBackRest::Manifest(
$oFileLocal->pathGet(PATH_BACKUP_CLUSTER, "${strBackupLastPath}/" . FILE_MANIFEST));
@@ -527,6 +558,7 @@ sub process
{
&log(WARN, "no prior backup exists, ${strType} backup has been changed to full");
$strType = BACKUP_TYPE_FULL;
+ $strBackupLastPath = undef;
}
}
@@ -543,36 +575,7 @@ sub process
$oBackupManifest->boolSet(MANIFEST_SECTION_BACKUP_OPTION, MANIFEST_KEY_ARCHIVE_CHECK, undef,
!optionGet(OPTION_ONLINE) || optionGet(OPTION_BACKUP_ARCHIVE_CHECK));
- # Initialize database objects
- my $oDbMaster = undef;
- my $oDbStandby = undef;
-
- # Get the database objects
- ($oDbMaster, $self->{iMasterRemoteIdx}, $oDbStandby, $self->{iCopyRemoteIdx}) = dbObjectGet();
-
- # If remote copy was not explicitly set then set it equal to master
- if (!defined($self->{iCopyRemoteIdx}))
- {
- $self->{iCopyRemoteIdx} = $self->{iMasterRemoteIdx};
- }
-
- # Initialize the master file object
- my $oFileMaster = new pgBackRest::File
- (
- optionGet(OPTION_STANZA),
- optionGet(OPTION_REPO_PATH),
- protocolGet(DB, $self->{iMasterRemoteIdx})
- );
-
- # Determine the database paths
- my $strDbMasterPath = optionGet(optionIndex(OPTION_DB_PATH, $self->{iMasterRemoteIdx}));
- my $strDbCopyPath = optionGet(optionIndex(OPTION_DB_PATH, $self->{iCopyRemoteIdx}));
-
- # Database info
- my ($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId) = $oDbMaster->info();
-
- my $iDbHistoryId = $oBackupInfo->check($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId);
-
+ # Database settings
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_ID, undef, $iDbHistoryId);
$oBackupManifest->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $strDbVersion);
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CONTROL, undef, $iControlVersion);
diff --git a/lib/pgBackRest/BackupInfo.pm b/lib/pgBackRest/BackupInfo.pm
index eb6360a8f..4e88be508 100644
--- a/lib/pgBackRest/BackupInfo.pm
+++ b/lib/pgBackRest/BackupInfo.pm
@@ -783,7 +783,7 @@ sub delete
####################################################################################################################################
# create
#
-# Create the info file. WARNING - this file should only be called from stanza-create.
+# Create the info file. WARNING - this file should only be called from stanza-create or test modules.
####################################################################################################################################
sub create
{
@@ -939,6 +939,68 @@ sub dbSectionSet
return logDebugReturn($strOperation);
}
+####################################################################################################################################
+# confirmDb
+#
+# Ensure that the backup is associated with the database passed.
+# NOTE: The backup must exist in the backup:current section.
+####################################################################################################################################
+sub confirmDb
+{
+ my $self = shift;
+
+ # Assign function parameters, defaults, and log debug info
+ my
+ (
+ $strOperation,
+ $strBackup,
+ $strDbVersion,
+ $ullDbSysId,
+ ) =
+ logDebugParam
+ (
+ __PACKAGE__ . '->confirmDb', \@_,
+ {name => 'strBackup', trace => true},
+ {name => 'strDbVersion', trace => true},
+ {name => 'ullDbSysId', trace => true},
+ );
+
+ my $bConfirmDb = undef;
+
+ # Get the db-id associated with the backup
+ my $iDbHistoryId = $self->get(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackup, INFO_BACKUP_KEY_HISTORY_ID);
+
+ # Get the version and system-id for all known databases
+ my $hDbList = $self->dbHistoryList();
+
+ # If the db-id for the backup exists in the list
+ if (exists $hDbList->{$iDbHistoryId})
+ {
+ # If the version and system-id match then datbase is confirmed for the backup
+ if (($hDbList->{$iDbHistoryId}{&INFO_DB_VERSION} eq $strDbVersion) &&
+ ($hDbList->{$iDbHistoryId}{&INFO_SYSTEM_ID} eq $ullDbSysId))
+ {
+ $bConfirmDb = true;
+ }
+ else
+ {
+ $bConfirmDb = false;
+ }
+ }
+ # If not, the backup.info file must be corrupt
+ else
+ {
+ confess &log(ERROR, "backup info file is missing database history information for an existing backup", ERROR_FILE_INVALID);
+ }
+
+ # Return from function and log return values if any
+ return logDebugReturn
+ (
+ $strOperation,
+ {name => 'bConfirmDb', value => $bConfirmDb}
+ );
+}
+
####################################################################################################################################
# confirmExists
#
diff --git a/lib/pgBackRest/Expire.pm b/lib/pgBackRest/Expire.pm
index 29b9b5842..c7292bdf9 100644
--- a/lib/pgBackRest/Expire.pm
+++ b/lib/pgBackRest/Expire.pm
@@ -84,6 +84,7 @@ sub DESTROY
sub logExpire
{
my $self = shift;
+ my $strArchiveId = shift;
my $strArchiveFile = shift;
if (defined($strArchiveFile))
@@ -104,8 +105,8 @@ sub logExpire
{
if (defined($self->{strArchiveExpireStart}))
{
- &log(DETAIL, 'remove archive: start = ' . substr($self->{strArchiveExpireStart}, 0, 24) .
- ', stop = ' . substr($self->{strArchiveExpireStop}, 0, 24));
+ &log(DETAIL, "remove archive: archiveId = ${strArchiveId}, start = " . substr($self->{strArchiveExpireStart}, 0, 24) .
+ ", stop = " . substr($self->{strArchiveExpireStop}, 0, 24));
}
undef($self->{strArchiveExpireStart});
@@ -303,9 +304,9 @@ sub process
my $strFullPath = $oFile->pathGet(PATH_BACKUP_ARCHIVE, $strArchiveId);
remove_tree($strFullPath) > 0
- or confess &log(ERROR, "unable to remove orphaned ${strFullPath}", ERROR_PATH_REMOVE);
+ or confess &log(ERROR, "unable to remove archive path ${strFullPath}", ERROR_PATH_REMOVE);
- &log(INFO, "removed orphaned archive path: ${strFullPath}");
+ &log(INFO, "remove archive path: ${strFullPath}");
}
# Continue to next directory
@@ -336,8 +337,8 @@ sub process
{
if ($strArchiveRetentionType eq BACKUP_TYPE_FULL && scalar @stryLocalBackupRetention > 0)
{
- &log(INFO, "full backup total < ${iArchiveRetention} - using oldest full backup for ${strArchiveId} " .
- " archive retention");
+ &log(INFO, "full backup total < ${iArchiveRetention} - using oldest full backup for ${strArchiveId} " .
+ "archive retention");
$stryLocalBackupArchiveRentention[0] = $stryLocalBackupRetention[0];
}
}
@@ -426,7 +427,7 @@ sub process
# Log expire info
logDebugMisc($strOperation, "remove major WAL path: ${strFullPath}");
- $self->logExpire($strPath);
+ $self->logExpire($strArchiveId, $strPath);
}
# Else delete individual files instead if the major path is less than or equal to the most recent
# retention backup. This optimization prevents scanning though major paths that could not possibly
@@ -455,15 +456,15 @@ sub process
{
fileRemove($oFile->pathGet(PATH_BACKUP_ARCHIVE, "${strArchiveId}/${strSubPath}"));
- logDebugMisc($strOperation, "remove WAL segment: ${strSubPath}");
+ logDebugMisc($strOperation, "remove WAL segment: ${strArchiveId}/${strSubPath}");
# Log expire info
- $self->logExpire(substr($strSubPath, 0, 24));
+ $self->logExpire($strArchiveId, substr($strSubPath, 0, 24));
}
else
{
# Log that the file was not expired
- $self->logExpire();
+ $self->logExpire($strArchiveId);
}
}
}
@@ -472,7 +473,7 @@ sub process
# Log if no archive was expired
if ($self->{iArchiveExpireTotal} == 0)
{
- &log(DETAIL, 'no archive to remove');
+ &log(DETAIL, "no archive to remove, archiveId = ${strArchiveId}");
}
}
}
diff --git a/test/expect/expire-expire-001.log b/test/expect/expire-expire-001.log
index e90ae3831..df1cc6370 100644
--- a/test/expect/expire-expire-001.log
+++ b/test/expect/expire-expire-001.log
@@ -301,7 +301,7 @@ Nothing to expire
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=1 --retention-archive-type=full --retention-diff=1 --retention-full=1 --stanza=db
P00 DETAIL: archive retention on backup [BACKUP-FULL-1], archiveId = 9.2-1, start = 000000010000000000000000
-P00 DETAIL: no archive to remove
+P00 DETAIL: no archive to remove, archiveId = 9.2-1
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -908,7 +908,7 @@ P00 INFO: expire full backup set: [BACKUP-FULL-1], [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-FULL-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 000000010000000100000000
-P00 DETAIL: remove archive: start = 0000000100000000, stop = 0000000100000000
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 0000000100000000, stop = 0000000100000000
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -1274,7 +1274,7 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 INFO: expire diff backup [BACKUP-DIFF-1]
P00 INFO: remove expired backup [BACKUP-DIFF-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 000000010000000100000000
-P00 DETAIL: no archive to remove
+P00 DETAIL: no archive to remove, archiveId = 9.2-1
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -1931,8 +1931,8 @@ P00 INFO: remove expired backup [BACKUP-DIFF-2]
P00 INFO: remove expired backup [BACKUP-FULL-2]
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-3], archiveId = 9.2-1, start = 000000010000000200000016
-P00 DETAIL: remove archive: start = 0000000100000001, stop = 00000001000000020000000F
-P00 DETAIL: remove archive: start = 000000010000000200000013, stop = 000000010000000200000015
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 0000000100000001, stop = 00000001000000020000000F
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000013, stop = 000000010000000200000015
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -2053,7 +2053,7 @@ P00 INFO: remove expired backup [BACKUP-INCR-2]
P00 INFO: remove expired backup [BACKUP-DIFF-3]
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], archiveId = 9.2-1, start = 00000001000000020000001E
-P00 DETAIL: remove archive: start = 000000010000000200000016, stop = 00000001000000020000001D
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000016, stop = 00000001000000020000001D
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -2164,7 +2164,7 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], archiveId = 9.2-1, start = 00000001000000020000001E, stop = 000000010000000200000020
P00 DETAIL: archive retention on backup [BACKUP-INCR-3], archiveId = 9.2-1, start = 000000010000000200000024
-P00 DETAIL: remove archive: start = 000000010000000200000021, stop = 000000010000000200000023
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000021, stop = 000000010000000200000023
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -2308,8 +2308,8 @@ P00 INFO: remove expired backup [BACKUP-DIFF-4]
P00 INFO: remove expired backup [BACKUP-FULL-3]
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.2-1, start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.2-1, start = 000000010000000200000036
-P00 DETAIL: remove archive: start = 000000010000000200000010, stop = 000000010000000200000029
-P00 DETAIL: remove archive: start = 00000001000000020000002D, stop = 000000010000000200000035
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000029
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 00000001000000020000002D, stop = 000000010000000200000035
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -2444,9 +2444,9 @@ P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.2-1, star
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], archiveId = 9.2-1, start = 00000001000000020000003C, stop = 00000001000000020000003E
P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], archiveId = 9.2-1, start = 000000010000000200000042, stop = 000000010000000200000044
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], archiveId = 9.2-1, start = 000000010000000200000048
-P00 DETAIL: remove archive: start = 000000010000000200000039, stop = 00000001000000020000003B
-P00 DETAIL: remove archive: start = 00000001000000020000003F, stop = 000000010000000200000041
-P00 DETAIL: remove archive: start = 000000010000000200000045, stop = 000000010000000200000047
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000039, stop = 00000001000000020000003B
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 00000001000000020000003F, stop = 000000010000000200000041
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000045, stop = 000000010000000200000047
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -2602,8 +2602,8 @@ P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], archiveId = 9.2-1, star
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], archiveId = 9.2-1, start = 000000010000000200000048, stop = 00000001000000020000004A
P00 DETAIL: archive retention on backup [BACKUP-FULL-7], archiveId = 9.2-1, start = 00000001000000020000004E, stop = 000000010000000200000050
P00 DETAIL: archive retention on backup [BACKUP-FULL-8], archiveId = 9.2-1, start = 000000010000000200000054
-P00 DETAIL: remove archive: start = 00000001000000020000004B, stop = 00000001000000020000004D
-P00 DETAIL: remove archive: start = 000000010000000200000051, stop = 000000010000000200000053
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 00000001000000020000004B, stop = 00000001000000020000004D
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000200000051, stop = 000000010000000200000053
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -3130,9 +3130,9 @@ Use oldest full backup for archive retention
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config="[TEST_PATH]/db-master/pgbackrest.conf" --stanza=db --log-level-console=detail --retention-full=10 --retention-diff=10 --retention-archive-type=full --retention-archive=10 expire
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=10 --retention-archive-type=full --retention-diff=10 --retention-full=10 --stanza=db
-P00 INFO: full backup total < 10 - using oldest full backup for 9.2-1 archive retention
+P00 INFO: full backup total < 10 - using oldest full backup for 9.2-1 archive retention
P00 DETAIL: archive retention on backup [BACKUP-FULL-8], archiveId = 9.2-1, start = 000000010000000200000054
-P00 DETAIL: remove archive: start = 00000001000000020000002A, stop = 000000010000000200000050
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 00000001000000020000002A, stop = 000000010000000200000050
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
diff --git a/test/expect/expire-expire-002.log b/test/expect/expire-expire-002.log
index 0ba65d2cf..a16b203fc 100644
--- a/test/expect/expire-expire-002.log
+++ b/test/expect/expire-expire-002.log
@@ -483,7 +483,7 @@ P00 INFO: expire full backup set: [BACKUP-FULL-1], [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-FULL-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 00000001000000000000000C
-P00 DETAIL: remove archive: start = 000000010000000000000000, stop = 00000001000000000000000B
+P00 DETAIL: remove archive: archiveId = 9.2-1, start = 000000010000000000000000, stop = 00000001000000000000000B
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.3-2, start = 000000010000000000000000
P00 INFO: expire command end: completed successfully
@@ -1164,9 +1164,9 @@ P00 INFO: expire full backup set: [BACKUP-FULL-3], [BACKUP-INCR-2]
P00 INFO: remove expired backup [BACKUP-INCR-2]
P00 INFO: remove expired backup [BACKUP-FULL-3]
P00 INFO: remove expired backup [BACKUP-FULL-2]
-P00 INFO: removed orphaned archive path: [TEST_PATH]/db-master/repo/archive/db/9.2-1
+P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/9.2-1
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.3-2, start = 0000000100000000000000FF
-P00 DETAIL: remove archive: start = 000000010000000000000000, stop = 0000000100000000000000FE
+P00 DETAIL: remove archive: archiveId = 9.3-2, start = 000000010000000000000000, stop = 0000000100000000000000FE
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.5-3, start = 000000010000000000000000
P00 INFO: expire command end: completed successfully
@@ -1322,10 +1322,10 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 INFO: expire diff backup [BACKUP-DIFF-1]
P00 INFO: remove expired backup [BACKUP-DIFF-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.3-2, start = 0000000100000000000000FF
-P00 DETAIL: no archive to remove
+P00 DETAIL: no archive to remove, archiveId = 9.3-2
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.5-3, start = 000000010000000000000000, stop = 000000010000000000000002
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], archiveId = 9.5-3, start = 000000010000000000000006
-P00 DETAIL: remove archive: start = 000000010000000000000003, stop = 000000010000000000000005
+P00 DETAIL: remove archive: archiveId = 9.5-3, start = 000000010000000000000003, stop = 000000010000000000000005
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
@@ -1397,3 +1397,131 @@ db-version="9.5"
000000010000000000000009-0000000000000000000000000000000000000000.gz
00000001000000000000000A-0000000000000000000000000000000000000000
00000001000000000000000B-0000000000000000000000000000000000000000.gz
+
++ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
+---------------------------------------------------------------------
+[backrest]
+backrest-checksum="[CHECKSUM]"
+backrest-format=5
+backrest-version="[VERSION-1]"
+
+[backup:current]
+[BACKUP-FULL-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"0000000100000000000000FF","backup-archive-stop":"000000010000000100000001","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":2,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
+[BACKUP-FULL-5]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000000","backup-archive-stop":"000000010000000000000002","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":3,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
+[BACKUP-FULL-6]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000006","backup-archive-stop":"000000010000000000000008","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":3,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
+
+[db]
+db-catalog-version=201510051
+db-control-version=942
+db-id=3
+db-system-id=6392579261579036436
+db-version="9.5"
+
+[db:history]
+1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
+2={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+3={"db-catalog-version":201510051,"db-control-version":942,"db-system-id":6392579261579036436,"db-version":"9.5"}
+
+> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
+------------------------------------------------------------------------------------------------------------------------------------
+[BACKUP-FULL-4]
+[BACKUP-FULL-5]
+[BACKUP-FULL-6]
+
+> ls -R [TEST_PATH]/db-master/repo/archive/db | grep -v "archive.info"
+------------------------------------------------------------------------------------------------------------------------------------
+[TEST_PATH]/db-master/repo/archive/db:
+9.3-2
+9.5-3
+
+[TEST_PATH]/db-master/repo/archive/db/9.3-2:
+0000000100000000
+0000000100000001
+
+[TEST_PATH]/db-master/repo/archive/db/9.3-2/0000000100000000:
+0000000100000000000000FF-0000000000000000000000000000000000000000.gz
+
+[TEST_PATH]/db-master/repo/archive/db/9.3-2/0000000100000001:
+000000010000000100000000-0000000000000000000000000000000000000000
+000000010000000100000001-0000000000000000000000000000000000000000.gz
+000000010000000100000002-0000000000000000000000000000000000000000.gz
+000000010000000100000003-0000000000000000000000000000000000000000
+000000010000000100000004-0000000000000000000000000000000000000000.gz
+000000010000000100000005-0000000000000000000000000000000000000000.gz
+000000010000000100000006-0000000000000000000000000000000000000000
+000000010000000100000007-0000000000000000000000000000000000000000.gz
+000000010000000100000008-0000000000000000000000000000000000000000.gz
+000000010000000100000009-0000000000000000000000000000000000000000
+00000001000000010000000A-0000000000000000000000000000000000000000.gz
+
+[TEST_PATH]/db-master/repo/archive/db/9.5-3:
+0000000100000000
+
+[TEST_PATH]/db-master/repo/archive/db/9.5-3/0000000100000000:
+000000010000000000000000-0000000000000000000000000000000000000000.gz
+000000010000000000000001-0000000000000000000000000000000000000000
+000000010000000000000002-0000000000000000000000000000000000000000.gz
+000000010000000000000006-0000000000000000000000000000000000000000.gz
+000000010000000000000007-0000000000000000000000000000000000000000
+000000010000000000000008-0000000000000000000000000000000000000000.gz
+000000010000000000000009-0000000000000000000000000000000000000000.gz
+00000001000000000000000A-0000000000000000000000000000000000000000
+00000001000000000000000B-0000000000000000000000000000000000000000.gz
+
+Expire all archive except for the current database
+> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config="[TEST_PATH]/db-master/pgbackrest.conf" --stanza=db --log-level-console=detail --retention-full=2 --retention-archive-type=full expire
+------------------------------------------------------------------------------------------------------------------------------------
+P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive-type=full --retention-full=2 --stanza=db
+P00 INFO: expire full backup [BACKUP-FULL-4]
+P00 INFO: remove expired backup [BACKUP-FULL-4]
+P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/9.3-2
+P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.5-3, start = 000000010000000000000000
+P00 DETAIL: no archive to remove, archiveId = 9.5-3
+P00 INFO: expire command end: completed successfully
+
++ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
+---------------------------------------------------------------------
+[backrest]
+backrest-checksum="[CHECKSUM]"
+backrest-format=5
+backrest-version="[VERSION-1]"
+
+[backup:current]
+[BACKUP-FULL-5]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000000","backup-archive-stop":"000000010000000000000002","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":3,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
+[BACKUP-FULL-6]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000006","backup-archive-stop":"000000010000000000000008","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":3,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
+
+[db]
+db-catalog-version=201510051
+db-control-version=942
+db-id=3
+db-system-id=6392579261579036436
+db-version="9.5"
+
+[db:history]
+1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
+2={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+3={"db-catalog-version":201510051,"db-control-version":942,"db-system-id":6392579261579036436,"db-version":"9.5"}
+
+> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
+------------------------------------------------------------------------------------------------------------------------------------
+[BACKUP-FULL-5]
+[BACKUP-FULL-6]
+
+> ls -R [TEST_PATH]/db-master/repo/archive/db | grep -v "archive.info"
+------------------------------------------------------------------------------------------------------------------------------------
+[TEST_PATH]/db-master/repo/archive/db:
+9.5-3
+
+[TEST_PATH]/db-master/repo/archive/db/9.5-3:
+0000000100000000
+
+[TEST_PATH]/db-master/repo/archive/db/9.5-3/0000000100000000:
+000000010000000000000000-0000000000000000000000000000000000000000.gz
+000000010000000000000001-0000000000000000000000000000000000000000
+000000010000000000000002-0000000000000000000000000000000000000000.gz
+000000010000000000000006-0000000000000000000000000000000000000000.gz
+000000010000000000000007-0000000000000000000000000000000000000000
+000000010000000000000008-0000000000000000000000000000000000000000.gz
+000000010000000000000009-0000000000000000000000000000000000000000.gz
+00000001000000000000000A-0000000000000000000000000000000000000000
+00000001000000000000000B-0000000000000000000000000000000000000000.gz
diff --git a/test/expect/full-synthetic-001.log b/test/expect/full-synthetic-001.log
index 8e7ecaf25..2bb8621bc 100644
--- a/test/expect/full-synthetic-001.log
+++ b/test/expect/full-synthetic-001.log
@@ -1240,7 +1240,6 @@ incr backup - invalid database version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -1251,7 +1250,6 @@ incr backup - invalid system id (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -1262,7 +1260,6 @@ incr backup - invalid control version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1273,7 +1270,6 @@ incr backup - invalid catalog version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1395,13 +1391,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1414,6 +1403,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1662,13 +1660,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1681,6 +1672,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-002.log b/test/expect/full-synthetic-002.log
index 62a254299..aeff3ed88 100644
--- a/test/expect/full-synthetic-002.log
+++ b/test/expect/full-synthetic-002.log
@@ -909,7 +909,6 @@ incr backup - invalid database version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -920,7 +919,6 @@ incr backup - invalid system id (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -931,7 +929,6 @@ incr backup - invalid control version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -942,7 +939,6 @@ incr backup - invalid catalog version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -998,13 +994,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1017,6 +1006,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1293,13 +1291,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1312,6 +1303,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-003.log b/test/expect/full-synthetic-003.log
index 4e9cbc4b2..e59f3946a 100644
--- a/test/expect/full-synthetic-003.log
+++ b/test/expect/full-synthetic-003.log
@@ -905,7 +905,6 @@ incr backup - invalid database version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -916,7 +915,6 @@ incr backup - invalid system id (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -927,7 +925,6 @@ incr backup - invalid control version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -938,7 +935,6 @@ incr backup - invalid catalog version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -994,13 +990,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1013,6 +1002,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1253,13 +1251,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1272,6 +1263,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-004.log b/test/expect/full-synthetic-004.log
index 368f13810..11d3d68be 100644
--- a/test/expect/full-synthetic-004.log
+++ b/test/expect/full-synthetic-004.log
@@ -907,7 +907,6 @@ incr backup - invalid database version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -918,7 +917,6 @@ incr backup - invalid system id (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -929,7 +927,6 @@ incr backup - invalid control version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -940,7 +937,6 @@ incr backup - invalid catalog version (db-master host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --hardlink --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -996,13 +992,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1015,6 +1004,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1290,13 +1288,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
@@ -1309,6 +1300,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-005.log b/test/expect/full-synthetic-005.log
index ac8ee1019..8ae884c3b 100644
--- a/test/expect/full-synthetic-005.log
+++ b/test/expect/full-synthetic-005.log
@@ -1327,7 +1327,6 @@ incr backup - invalid database version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -1338,7 +1337,6 @@ incr backup - invalid system id (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -1349,7 +1347,6 @@ incr backup - invalid control version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1360,7 +1357,6 @@ incr backup - invalid catalog version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1416,13 +1412,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1437,6 +1426,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1702,13 +1700,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1723,6 +1714,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-006.log b/test/expect/full-synthetic-006.log
index f67d3128e..a07a5cf52 100644
--- a/test/expect/full-synthetic-006.log
+++ b/test/expect/full-synthetic-006.log
@@ -965,7 +965,6 @@ incr backup - invalid database version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -976,7 +975,6 @@ incr backup - invalid system id (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -987,7 +985,6 @@ incr backup - invalid control version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -998,7 +995,6 @@ incr backup - invalid catalog version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --no-compress --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1054,13 +1050,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1075,6 +1064,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1375,13 +1373,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1396,6 +1387,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-007.log b/test/expect/full-synthetic-007.log
index f6b1765df..a8d7ceec5 100644
--- a/test/expect/full-synthetic-007.log
+++ b/test/expect/full-synthetic-007.log
@@ -959,7 +959,6 @@ incr backup - invalid database version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -970,7 +969,6 @@ incr backup - invalid system id (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -981,7 +979,6 @@ incr backup - invalid control version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -992,7 +989,6 @@ incr backup - invalid catalog version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1048,13 +1044,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1069,6 +1058,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1332,13 +1330,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1353,6 +1344,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/full-synthetic-008.log b/test/expect/full-synthetic-008.log
index 25b7e9f00..5b70cd843 100644
--- a/test/expect/full-synthetic-008.log
+++ b/test/expect/full-synthetic-008.log
@@ -961,7 +961,6 @@ incr backup - invalid database version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 8.0, system-id = 6353949018581704918
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -972,7 +971,6 @@ incr backup - invalid system id (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database version = 9.4, system-id 6353949018581704918 does not match backup version = 9.4, system-id = 6999999999999999999
HINT: is this the correct stanza?
P00 INFO: backup command end: aborted with exception [126]
@@ -983,7 +981,6 @@ incr backup - invalid control version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 842, catalog-version = 201409291
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -994,7 +991,6 @@ incr backup - invalid catalog version (backup host)
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --hardlink --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db --start-fast
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 ERROR: [126]: database control-version = 942, catalog-version 201409291 does not match backup control-version = 942, catalog-version = 197208141
HINT: this may be a symptom of database or repository corruption!
P00 INFO: backup command end: aborted with exception [126]
@@ -1050,13 +1046,6 @@ P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1071,6 +1060,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
@@ -1369,13 +1367,6 @@ P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
P00 DEBUG: BackupInfo->current=>: bTest = true
P00 WARN: backup [BACKUP-INCR-1] missing in repository removed from backup.info
P00 DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-INCR-1]
-P00 DEBUG: BackupInfo->last(): strType = incr
-P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
-P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
-P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
-P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
-P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
-P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: Db->new(): iRemoteIdx = 1
P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = 1, oParam = [undef], strRemoteType = db
P00 DEBUG: Protocol::Protocol::protocolGet: create (cached) remote protocol
@@ -1390,6 +1381,15 @@ P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>,
P00 DEBUG: Db->info=>: iDbCatalogVersion = 201409291, iDbControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check(): bRequired = <true>, iCatalogVersion = 201409291, iControlVersion = 942, strDbVersion = 9.4, ullDbSysId = 6353949018581704918
P00 DEBUG: BackupInfo->check=>: iDbHistoryId = 1
+P00 DEBUG: BackupInfo->last(): strType = incr
+P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
+P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
+P00 DEBUG: BackupInfo->list(): strFilter = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$, strOrder = reverse
+P00 DEBUG: BackupInfo->list=>: stryBackup = ([BACKUP-FULL-2])
+P00 DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
+P00 DEBUG: BackupInfo->dbHistoryList=>: hDbHash = [hash]
+P00 DEBUG: BackupInfo->confirmDb=>: bConfirmDb = true
+P00 INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
P00 DEBUG: File->exists(): strPath = [TEST_PATH]/db-master/db/base/postmaster.pid, strPathType = db:absolute
P00 DEBUG: File->exists=>: bExists = false
P00 WARN: incr backup cannot alter 'checksum-page' option to 'false', reset to 'true' from [BACKUP-FULL-2]
diff --git a/test/expect/stanza-upgrade-001.log b/test/expect/stanza-upgrade-001.log
index 74df0e705..539831b3b 100644
--- a/test/expect/stanza-upgrade-001.log
+++ b/test/expect/stanza-upgrade-001.log
@@ -286,7 +286,7 @@ P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-1]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=2 --retention-full=2 --stanza=db
-P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
+P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
@@ -353,10 +353,11 @@ db-version="9.5"
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
-full backup - create second full backup (db-master host)
-> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
+diff backup - diff changed to full backup (db-master host)
+> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=diff --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
-P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --retention-full=2 --stanza=db --start-fast --type=full
+P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --retention-full=2 --stanza=db --start-fast --type=diff
+P00 WARN: no prior backup exists, diff backup has been changed to full
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 15b1a1a35c26b17570aca7920980f0ad11c6d858
P01 INFO: backup file [TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum e28bf39d0a56bf9fabd4049b329fcae8878bfec6
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
@@ -364,7 +365,7 @@ P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=2 --retention-full=2 --stanza=db
-P00 INFO: removed orphaned archive path: [TEST_PATH]/db-master/repo/archive/db/10.0-3
+P00 INFO: remove archive path: [TEST_PATH]/db-master/repo/archive/db/10.0-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
diff --git a/test/expect/stanza-upgrade-002.log b/test/expect/stanza-upgrade-002.log
index a4c6e9f5f..b109d8956 100644
--- a/test/expect/stanza-upgrade-002.log
+++ b/test/expect/stanza-upgrade-002.log
@@ -286,7 +286,7 @@ P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-1]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --repo-path=[TEST_PATH]/backup/repo --retention-archive=2 --retention-full=2 --stanza=db
-P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
+P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
@@ -374,10 +374,11 @@ db-version="9.5"
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
-full backup - create second full backup (backup host)
-> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
+diff backup - diff changed to full backup (backup host)
+> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=diff --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
-P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --retention-full=2 --stanza=db --start-fast --type=full
+P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --retention-full=2 --stanza=db --start-fast --type=diff
+P00 WARN: no prior backup exists, diff backup has been changed to full
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 15b1a1a35c26b17570aca7920980f0ad11c6d858
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum e28bf39d0a56bf9fabd4049b329fcae8878bfec6
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
@@ -385,7 +386,7 @@ P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --repo-path=[TEST_PATH]/backup/repo --retention-archive=2 --retention-full=2 --stanza=db
-P00 INFO: removed orphaned archive path: [TEST_PATH]/backup/repo/archive/db/10.0-3
+P00 INFO: remove archive path: [TEST_PATH]/backup/repo/archive/db/10.0-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
diff --git a/test/lib/pgBackRestTest/Backup/BackupInfoUnitTest.pm b/test/lib/pgBackRestTest/Backup/BackupInfoUnitTest.pm
new file mode 100644
index 000000000..7fc5edc4e
--- /dev/null
+++ b/test/lib/pgBackRestTest/Backup/BackupInfoUnitTest.pm
@@ -0,0 +1,104 @@
+####################################################################################################################################
+# BackupInfoUnitTest.pm - Unit tests for BackupInfo
+####################################################################################################################################
+package pgBackRestTest::Backup::BackupInfoUnitTest;
+use parent 'pgBackRestTest::Common::Env::EnvHostTest';
+
+####################################################################################################################################
+# Perl includes
+####################################################################################################################################
+use strict;
+use warnings FATAL => qw(all);
+use Carp qw(confess);
+use English '-no_match_vars';
+
+use File::Basename qw(dirname);
+use Storable qw(dclone);
+
+use pgBackRest::BackupInfo;
+use pgBackRest::Common::Exception;
+use pgBackRest::Common::Lock;
+use pgBackRest::Common::Log;
+use pgBackRest::DbVersion;
+use pgBackRest::File;
+use pgBackRest::FileCommon;
+use pgBackRest::InfoCommon;
+use pgBackRest::Manifest;
+use pgBackRest::Protocol::Common;
+use pgBackRest::Protocol::Protocol;
+
+use pgBackRestTest::Common::Env::EnvHostTest;
+use pgBackRestTest::Common::ExecuteTest;
+use pgBackRestTest::Common::Host::HostBackupTest;
+use pgBackRestTest::Common::RunTest;
+
+####################################################################################################################################
+# initModule
+####################################################################################################################################
+sub initModule
+{
+ my $self = shift;
+
+ $self->{strDbPath} = $self->testPath() . '/db';
+ $self->{strRepoPath} = $self->testPath() . '/repo';
+ $self->{strArchivePath} = "$self->{strRepoPath}/archive/" . $self->stanza();
+ $self->{strBackupPath} = "$self->{strRepoPath}/backup/" . $self->stanza();
+ $self->{strSpoolPath} = "$self->{strArchivePath}/out";
+}
+
+####################################################################################################################################
+# initTest
+####################################################################################################################################
+sub initTest
+{
+ my $self = shift;
+
+ # Create archive info path
+ filePathCreate($self->{strArchivePath}, undef, true, true);
+
+ # Create backup info path
+ filePathCreate($self->{strBackupPath}, undef, true, true);
+
+ # Create pg_control path
+ filePathCreate(($self->{strDbPath} . '/' . DB_PATH_GLOBAL), undef, false, true);
+
+ # Copy a pg_control file into the pg_control path
+ executeTest(
+ 'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $self->{strDbPath} . '/' .
+ DB_FILE_PGCONTROL);
+}
+
+####################################################################################################################################
+# run
+####################################################################################################################################
+sub run
+{
+ my $self = shift;
+
+ # Increment the run, log, and decide whether this unit test should be run
+ ################################################################################################################################
+ if ($self->begin("BackupInfo::confirmDb()"))
+ {
+ my $oBackupInfo = new pgBackRest::BackupInfo($self->{strBackupPath}, false, false);
+ $oBackupInfo->create(PG_VERSION_93, WAL_VERSION_93_SYS_ID, '937', '201306121', true);
+
+ my $strBackupLabel = "20170403-175647F";
+
+ $oBackupInfo->set(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackupLabel, INFO_BACKUP_KEY_HISTORY_ID,
+ $oBackupInfo->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_HISTORY_ID));
+
+ #---------------------------------------------------------------------------------------------------------------------------
+ $self->testResult(sub {$oBackupInfo->confirmDb($strBackupLabel, PG_VERSION_93, WAL_VERSION_93_SYS_ID,)}, true,
+ 'backup db matches');
+
+ #---------------------------------------------------------------------------------------------------------------------------
+ $self->testResult(sub {$oBackupInfo->confirmDb($strBackupLabel, PG_VERSION_94, WAL_VERSION_93_SYS_ID,)}, false,
+ 'backup db wrong version');
+
+ #---------------------------------------------------------------------------------------------------------------------------
+ $self->testResult(sub {$oBackupInfo->confirmDb($strBackupLabel, PG_VERSION_93, WAL_VERSION_94_SYS_ID,)}, false,
+ 'backup db wrong system-id');
+ }
+}
+
+1;
diff --git a/test/lib/pgBackRestTest/Common/DefineTest.pm b/test/lib/pgBackRestTest/Common/DefineTest.pm
index a679876cf..43cc11ddb 100644
--- a/test/lib/pgBackRestTest/Common/DefineTest.pm
+++ b/test/lib/pgBackRestTest/Common/DefineTest.pm
@@ -309,6 +309,11 @@ my $oTestDef =
&TESTDEF_TEST_TOTAL => 3,
&TESTDEF_TEST_INDIVIDUAL => false,
},
+ {
+ &TESTDEF_TEST_NAME => 'info-unit',
+ &TESTDEF_TEST_TOTAL => 1,
+ &TESTDEF_TEST_INDIVIDUAL => false,
+ },
]
},
# Expire tests
diff --git a/test/lib/pgBackRestTest/Expire/ExpireExpireTest.pm b/test/lib/pgBackRestTest/Expire/ExpireExpireTest.pm
index b01f40179..febb51921 100644
--- a/test/lib/pgBackRestTest/Expire/ExpireExpireTest.pm
+++ b/test/lib/pgBackRestTest/Expire/ExpireExpireTest.pm
@@ -208,6 +208,11 @@ sub run
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), 3, 1, BACKUP_TYPE_DIFF, 1, $strDescription);
+ #-----------------------------------------------------------------------------------------------------------------------
+ $strDescription = 'Expire all archive except for the current database';
+
+ $oExpireTest->process($self->stanza(), 2, undef, BACKUP_TYPE_FULL, undef, $strDescription);
+
#-----------------------------------------------------------------------------------------------------------------------
$self->optionReset($oOption, OPTION_DB_PATH);
$self->optionReset($oOption, OPTION_ONLINE);
diff --git a/test/lib/pgBackRestTest/Stanza/StanzaUnitTest.pm b/test/lib/pgBackRestTest/Stanza/StanzaUnitTest.pm
index 42f523a08..0e4196cef 100644
--- a/test/lib/pgBackRestTest/Stanza/StanzaUnitTest.pm
+++ b/test/lib/pgBackRestTest/Stanza/StanzaUnitTest.pm
@@ -1,5 +1,5 @@
####################################################################################################################################
-# ArchivePushUnitTest.pm - Unit tests for ArchivePush and ArchivePush Async
+# StanzaUnitTest.pm - Unit tests for Stanza.pm
####################################################################################################################################
package pgBackRestTest::Stanza::StanzaUnitTest;
use parent 'pgBackRestTest::Common::Env::EnvHostTest';
diff --git a/test/lib/pgBackRestTest/Stanza/StanzaUpgradeTest.pm b/test/lib/pgBackRestTest/Stanza/StanzaUpgradeTest.pm
index 7b240e9f9..7050c1320 100644
--- a/test/lib/pgBackRestTest/Stanza/StanzaUpgradeTest.pm
+++ b/test/lib/pgBackRestTest/Stanza/StanzaUpgradeTest.pm
@@ -151,11 +151,16 @@ sub run
$oHostBackup->stanzaUpgrade('successfully upgrade with XX.Y-Z', {strOptionalParam => '--no-' . OPTION_ONLINE});
- # Push a WAL and create a backup in the new DB to confirm info command displays the JSON correctly
+ # Push a WAL and create a backup in the new DB to confirm diff changed to full and info command displays the JSON correctly
#--------------------------------------------------------------------------------------------------------------------------
$oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_95 . '.bin', 1);
- $oHostBackup->backup('full', 'create second full backup ', {strOptionalParam => '--retention-full=2 --no-' .
- OPTION_ONLINE . ' --log-level-console=detail'}, false);
+
+ # Test backup is changed from type=DIFF to FULL (WARN message displayed)
+ my $oExecuteBackup = $oHostBackup->backupBegin('diff', 'diff changed to full backup',
+ {strOptionalParam => '--retention-full=2 --no-' . OPTION_ONLINE . ' --log-level-console=detail'});
+ $oHostBackup->backupEnd('full', $oExecuteBackup, undef, false);
+
+ # Confirm info command displays the JSON correctly
$oHostDbMaster->info('db upgraded - db-1 and db-2 listed', {strOutput => INFO_OUTPUT_JSON});
}
}
[parent: 0da216c034d4]