1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-03 00:26:59 +02:00

Added tablespace setting to allow compact database restores for development, staging, etc.

This commit is contained in:
David Steele
2015-05-08 18:34:27 -04:00
parent a0d985b7ad
commit 9aa41ee76b
13 changed files with 678 additions and 27 deletions

View File

@ -647,6 +647,19 @@ required: n
example: archive-max-mb=1024 example: archive-max-mb=1024
``` ```
#### `restore` section
The `restore` section defines settings used for restoring backups.
##### `tablespace` key
Defines whether tablespaces will be be restored into their original (or remapped) locations or stored directly under the `pg_tblspc` path. Disabling this setting produces compact restores that are convenient for development, staging, etc. Currently these restores cannot be backed up as PgBackRest expects only links in the `pg_tblspc` path. If no tablespaces are present this this setting has no effect.
```
required: n
default: y
example: tablespace=n
```
#### `expire` section #### `expire` section
The `expire` section defines how long backups will be retained. Expiration only occurs when the number of complete backups exceeds the allowed retention. In other words, if full-retention is set to 2, then there must be 3 complete backups before the oldest will be expired. Make sure you always have enough space for rentention + 1 backups. The `expire` section defines how long backups will be retained. Expiration only occurs when the number of complete backups exceeds the allowed retention. In other words, if full-retention is set to 2, then there must be 3 complete backups before the oldest will be expired. Make sure you always have enough space for rentention + 1 backups.
@ -726,6 +739,8 @@ example: db-path=/data/db
* Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path. * Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path.
* Added `tablespace` setting to allow tablespaces to be restored into the `pg_tblspc` path. This produces compact restores that are convenient for development, staging, etc. Currently these restores cannot be backed up as PgBackRest expects only links in the `pg_tblspc` path.
### v0.61: bug fix for uncompressed remote destination ### v0.61: bug fix for uncompressed remote destination
* Fixed a buffering error that could occur on large, highly-compressible files when copying to an uncompressed remote destination. The error was detected in the decompression code and resulted in a failed backup rather than corruption so it should not affect successful backups made with previous versions. * Fixed a buffering error that could occur on large, highly-compressible files when copying to an uncompressed remote destination. The error was detected in the decompression code and resulted in a failed backup rather than corruption so it should not affect successful backups made with previous versions.

View File

@ -573,7 +573,6 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<config-section id="archive"> <config-section id="archive">
<text>The <setting>archive</setting> section defines parameters when doing async archiving. This means that the archive files will be stored locally, then a background process will pick them and move them to the backup.</text> <text>The <setting>archive</setting> section defines parameters when doing async archiving. This means that the archive files will be stored locally, then a background process will pick them and move them to the backup.</text>
<!-- CONFIG - ARCHIVE SECTION - PATH KEY -->
<config-key-list> <config-key-list>
<!-- CONFIG - ARCHIVE SECTION - ARCHIVE-ASYNC KEY --> <!-- CONFIG - ARCHIVE SECTION - ARCHIVE-ASYNC KEY -->
<config-key id="archive-async"> <config-key id="archive-async">
@ -600,6 +599,19 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
</config-key-list> </config-key-list>
</config-section> </config-section>
<!-- CONFIG - RESTORE -->
<config-section id="restore">
<text>The <setting>restore</setting> section defines settings used for restoring backups.</text>
<config-key-list>
<!-- CONFIG - RESTORE SECTION - TABLESPACE KEY -->
<config-key id="tablespace">
<text>Defines whether tablespaces will be be restored into their original (or remapped) locations or stored directly under the <path>pg_tblspc</path> path. Disabling this setting produces compact restores that are convenient for development, staging, etc. Currently these restores cannot be backed up as <backrest/> expects only links in the <path>pg_tblspc</path> path. If no tablespaces are present this this setting has no effect.</text>
<example>n</example>
</config-key>
</config-key-list>
</config-section>
<!-- CONFIG - EXPIRE --> <!-- CONFIG - EXPIRE -->
<config-section id="expire"> <config-section id="expire">
<text>The <setting>expire</setting> section defines how long backups will be retained. Expiration only occurs when the number of complete backups exceeds the allowed retention. In other words, if full-retention is set to 2, then there must be 3 complete backups before the oldest will be expired. Make sure you always have enough space for rentention + 1 backups.</text> <text>The <setting>expire</setting> section defines how long backups will be retained. Expiration only occurs when the number of complete backups exceeds the allowed retention. In other words, if full-retention is set to 2, then there must be 3 complete backups before the oldest will be expired. Make sure you always have enough space for rentention + 1 backups.</text>
@ -683,6 +695,9 @@ Run a <id>full</id> backup on the <id>db</id> stanza. <param>--type</param> can
<release-feature> <release-feature>
<text>Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path.</text> <text>Fixed an issue where an absolute path was not written into recovery.conf when the restore was run with a relative path.</text>
</release-feature> </release-feature>
<release-feature>
<text>Added <setting>tablespace</setting> setting to allow tablespaces to be restored into the <path>pg_tblspc</path> path. This produces compact restores that are convenient for development, staging, etc. Currently these restores cannot be backed up as <backrest/> expects only links in the <path>pg_tblspc</path> path.</text>
</release-feature>
</release-feature-bullet-list> </release-feature-bullet-list>
</release-version> </release-version>

View File

@ -169,6 +169,7 @@ use constant
OPTION_RETENTION_FULL => 'retention-' . BACKUP_TYPE_FULL, OPTION_RETENTION_FULL => 'retention-' . BACKUP_TYPE_FULL,
# RESTORE Section # RESTORE Section
OPTION_TABLESPACE => 'tablespace',
OPTION_RESTORE_TABLESPACE_MAP => 'tablespace-map', OPTION_RESTORE_TABLESPACE_MAP => 'tablespace-map',
OPTION_RESTORE_RECOVERY_SETTING => 'recovery-setting', OPTION_RESTORE_RECOVERY_SETTING => 'recovery-setting',
@ -199,7 +200,7 @@ push @EXPORT, qw(OPTION_CONFIG OPTION_DELTA OPTION_FORCE OPTION_NO_START_STOP OP
OPTION_RESTORE_RECOVERY_SETTING OPTION_RETENTION_ARCHIVE OPTION_RETENTION_ARCHIVE_TYPE OPTION_RETENTION_FULL OPTION_RESTORE_RECOVERY_SETTING OPTION_RETENTION_ARCHIVE OPTION_RETENTION_ARCHIVE_TYPE OPTION_RETENTION_FULL
OPTION_RETENTION_DIFF OPTION_START_FAST OPTION_THREAD_MAX OPTION_THREAD_TIMEOUT OPTION_RETENTION_DIFF OPTION_START_FAST OPTION_THREAD_MAX OPTION_THREAD_TIMEOUT
OPTION_DB_USER OPTION_BACKUP_USER OPTION_COMMAND_PSQL OPTION_COMMAND_PSQL_OPTION OPTION_COMMAND_REMOTE OPTION_DB_USER OPTION_BACKUP_USER OPTION_COMMAND_PSQL OPTION_COMMAND_PSQL_OPTION OPTION_COMMAND_REMOTE
OPTION_RESTORE_TABLESPACE_MAP OPTION_TABLESPACE OPTION_RESTORE_TABLESPACE_MAP
OPTION_TEST OPTION_TEST_DELAY OPTION_TEST_NO_FORK); OPTION_TEST OPTION_TEST_DELAY OPTION_TEST_NO_FORK);
@ -245,6 +246,7 @@ use constant
OPTION_DEFAULT_RESTORE_DELTA => false, OPTION_DEFAULT_RESTORE_DELTA => false,
OPTION_DEFAULT_RESTORE_FORCE => false, OPTION_DEFAULT_RESTORE_FORCE => false,
OPTION_DEFAULT_RESTORE_SET => 'latest', OPTION_DEFAULT_RESTORE_SET => 'latest',
OPTION_DEFAULT_RESTORE_TABLESPACE => true,
OPTION_DEFAULT_RESTORE_TYPE => RECOVERY_TYPE_DEFAULT, OPTION_DEFAULT_RESTORE_TYPE => RECOVERY_TYPE_DEFAULT,
OPTION_DEFAULT_RESTORE_TARGET_EXCLUSIVE => false, OPTION_DEFAULT_RESTORE_TARGET_EXCLUSIVE => false,
OPTION_DEFAULT_RESTORE_TARGET_RESUME => false, OPTION_DEFAULT_RESTORE_TARGET_RESUME => false,
@ -799,6 +801,17 @@ my %oOptionRule =
} }
}, },
&OPTION_TABLESPACE =>
{
&OPTION_RULE_TYPE => OPTION_TYPE_BOOLEAN,
&OPTION_RULE_DEFAULT => OPTION_DEFAULT_RESTORE_TABLESPACE,
&OPTION_RULE_SECTION => true,
&OPTION_RULE_OPERATION =>
{
&OP_RESTORE => true
}
},
&OPTION_RESTORE_TABLESPACE_MAP => &OPTION_RESTORE_TABLESPACE_MAP =>
{ {
&OPTION_RULE_TYPE => OPTION_TYPE_HASH, &OPTION_RULE_TYPE => OPTION_TYPE_HASH,

View File

@ -210,8 +210,33 @@ sub manifest_load
$oManifest->set(MANIFEST_SECTION_BACKUP_PATH, MANIFEST_KEY_BASE, undef, $self->{strDbClusterPath}); $oManifest->set(MANIFEST_SECTION_BACKUP_PATH, MANIFEST_KEY_BASE, undef, $self->{strDbClusterPath});
} }
# If no tablespaces are requested
if (!optionGet(OPTION_TABLESPACE))
{
foreach my $strTablespaceName ($oManifest->keys(MANIFEST_SECTION_BACKUP_TABLESPACE))
{
my $strTablespaceKey =
$oManifest->get(MANIFEST_SECTION_BACKUP_TABLESPACE, $strTablespaceName, MANIFEST_SUBKEY_LINK);
my $strTablespaceLink = "pg_tblspc/${strTablespaceKey}";
my $strTablespacePath =
$oManifest->get(MANIFEST_SECTION_BACKUP_PATH, MANIFEST_KEY_BASE) . "/${strTablespaceLink}";
$oManifest->set(MANIFEST_SECTION_BACKUP_PATH, "tablespace:${strTablespaceName}", undef, $strTablespacePath);
$oManifest->set(MANIFEST_SECTION_BACKUP_TABLESPACE, $strTablespaceName, MANIFEST_SUBKEY_PATH, $strTablespacePath);
$oManifest->remove('base:link', $strTablespaceLink);
$oManifest->set('base:path', $strTablespaceLink, MANIFEST_SUBKEY_GROUP,
$oManifest->get('base:path', '.', MANIFEST_SUBKEY_GROUP));
$oManifest->set('base:path', $strTablespaceLink, MANIFEST_SUBKEY_USER,
$oManifest->get('base:path', '.', MANIFEST_SUBKEY_USER));
$oManifest->set('base:path', $strTablespaceLink, MANIFEST_SUBKEY_MODE,
$oManifest->get('base:path', '.', MANIFEST_SUBKEY_MODE));
&log(INFO, "remapping tablespace ${strTablespaceKey} to ${strTablespacePath}");
}
}
# If tablespaces have been remapped, update the manifest # If tablespaces have been remapped, update the manifest
if (defined($self->{oRemapRef})) elsif (defined($self->{oRemapRef}))
{ {
foreach my $strPathKey (sort(keys $self->{oRemapRef})) foreach my $strPathKey (sort(keys $self->{oRemapRef}))
{ {
@ -266,7 +291,7 @@ sub clean
if (!$self->{oFile}->exists(PATH_DB_ABSOLUTE, $strPath)) if (!$self->{oFile}->exists(PATH_DB_ABSOLUTE, $strPath))
{ {
confess &log(ERROR, "required db path '${strPath}' does not exist"); next;
} }
# Load path manifest so it can be compared to deleted files/paths/links that are not in the backup # Load path manifest so it can be compared to deleted files/paths/links that are not in the backup
@ -434,6 +459,17 @@ sub build
} }
} }
} }
# Make sure that all paths required for the restore now exist
foreach my $strPathKey ($oManifest->keys(MANIFEST_SECTION_BACKUP_PATH))
{
my $strPath = $oManifest->get(MANIFEST_SECTION_BACKUP_PATH, $strPathKey);
if (!$self->{oFile}->exists(PATH_DB_ABSOLUTE, $strPath))
{
confess &log(ERROR, "required db path '${strPath}' does not exist");
}
}
} }
#################################################################################################################################### ####################################################################################################################################
@ -451,12 +487,12 @@ sub recovery
# See if recovery.conf already exists # See if recovery.conf already exists
my $bRecoveryConfExists = $self->{oFile}->exists(PATH_DB_ABSOLUTE, $strRecoveryConf); my $bRecoveryConfExists = $self->{oFile}->exists(PATH_DB_ABSOLUTE, $strRecoveryConf);
# If RECOVERY_TYPE_PRESERVE then make sure recovery.conf exists and return # If RECOVERY_TYPE_PRESERVE then warn if recovery.conf does not exist and return
if ($self->{strType} eq RECOVERY_TYPE_PRESERVE) if ($self->{strType} eq RECOVERY_TYPE_PRESERVE)
{ {
if (!$bRecoveryConfExists) if (!$bRecoveryConfExists)
{ {
confess &log(ERROR, "recovery type is $self->{strType} but recovery file does not exist at ${strRecoveryConf}"); &log(WARN, "recovery type is $self->{strType} but recovery file does not exist at ${strRecoveryConf}");
} }
return; return;
@ -536,6 +572,8 @@ sub recovery
close($hFile) close($hFile)
or confess "unable to close ${strRecoveryConf}: $!"; or confess "unable to close ${strRecoveryConf}: $!";
&log(INFO, "wrote $strRecoveryConf");
} }
#################################################################################################################################### ####################################################################################################################################
@ -677,6 +715,8 @@ sub restore
# Create recovery.conf file # Create recovery.conf file
$self->recovery(); $self->recovery();
&log(INFO, "restore complete");
} }
1; 1;

View File

@ -92,11 +92,38 @@ sub BackRestTestBackup_PgDisconnect
# Connect to the db (whether it is local or remote) # Connect to the db (whether it is local or remote)
if (defined($hDb)) if (defined($hDb))
{ {
$hDb->disconnect; $hDb->disconnect();
undef($hDb); undef($hDb);
} }
} }
####################################################################################################################################
# BackRestTestBackup_PgExecuteNoTrans
####################################################################################################################################
sub BackRestTestBackup_PgExecuteNoTrans
{
my $strSql = shift;
# Connect to the db with autocommit on so we can runs statements that can't run in transaction blocks
my $hDb = DBI->connect('dbi:Pg:dbname=postgres;port=' . BackRestTestCommon_DbPortGet .
';host=' . BackRestTestCommon_DbPathGet(),
BackRestTestCommon_UserGet(),
undef,
{AutoCommit => 1, RaiseError => 1});
# Log and execute the statement
&log(DEBUG, "SQL: ${strSql}");
my $hStatement = $hDb->prepare($strSql);
$hStatement->execute() or
confess &log(ERROR, "Unable to execute: ${strSql}");
$hStatement->finish();
# Close the connection
$hDb->disconnect();
}
#################################################################################################################################### ####################################################################################################################################
# BackRestTestBackup_PgExecute # BackRestTestBackup_PgExecute
#################################################################################################################################### ####################################################################################################################################
@ -1176,6 +1203,8 @@ sub BackRestTestBackup_Restore
my $oRecoveryHashRef = shift; my $oRecoveryHashRef = shift;
my $strComment = shift; my $strComment = shift;
my $iExpectedExitStatus = shift; my $iExpectedExitStatus = shift;
my $strOptionalParam = shift;
my $bCompare = shift;
# Set defaults # Set defaults
$bDelta = defined($bDelta) ? $bDelta : false; $bDelta = defined($bDelta) ? $bDelta : false;
@ -1234,6 +1263,7 @@ sub BackRestTestBackup_Restore
'/pg_backrest.conf' . (defined($bDelta) && $bDelta ? ' --delta' : '') . '/pg_backrest.conf' . (defined($bDelta) && $bDelta ? ' --delta' : '') .
(defined($bForce) && $bForce ? ' --force' : '') . (defined($bForce) && $bForce ? ' --force' : '') .
($strBackup ne 'latest' ? " --set=${strBackup}" : '') . ($strBackup ne 'latest' ? " --set=${strBackup}" : '') .
(defined($strOptionalParam) ? " ${strOptionalParam} " : '') .
(defined($strType) && $strType ne RECOVERY_TYPE_DEFAULT ? " --type=${strType}" : '') . (defined($strType) && $strType ne RECOVERY_TYPE_DEFAULT ? " --type=${strType}" : '') .
(defined($strTarget) ? " --target=\"${strTarget}\"" : '') . (defined($strTarget) ? " --target=\"${strTarget}\"" : '') .
(defined($strTargetTimeline) ? " --target-timeline=\"${strTargetTimeline}\"" : '') . (defined($strTargetTimeline) ? " --target-timeline=\"${strTargetTimeline}\"" : '') .
@ -1242,7 +1272,7 @@ sub BackRestTestBackup_Restore
" --stanza=${strStanza} restore", " --stanza=${strStanza} restore",
undef, undef, undef, $iExpectedExitStatus, $strComment); undef, undef, undef, $iExpectedExitStatus, $strComment);
if (!defined($iExpectedExitStatus)) if (!defined($iExpectedExitStatus) && (!defined($bCompare) || $bCompare))
{ {
BackRestTestBackup_RestoreCompare($oFile, $strStanza, $bRemote, $strBackup, $bSynthetic, $oExpectedManifestRef); BackRestTestBackup_RestoreCompare($oFile, $strStanza, $bRemote, $strBackup, $bSynthetic, $oExpectedManifestRef);
} }
@ -1288,11 +1318,27 @@ sub BackRestTestBackup_RestoreCompare
} }
# Generate the tablespace map for real backups
my %oTablespaceMap;
# ${$oTablespaceMapRef}{oid}{$strName}{name} = $strName;
if (!$bSynthetic && defined(${$oExpectedManifestRef}{'backup:tablespace'}))
{
foreach my $strTablespaceName (keys(${$oExpectedManifestRef}{'backup:tablespace'}))
{
my $strTablespaceOid = ${$oExpectedManifestRef}{'backup:tablespace'}{$strTablespaceName}{link};
#
# confess "GOT HERE - $strTablespaceOid, $strTablespaceName";
$oTablespaceMap{oid}{$strTablespaceOid}{name} = $strTablespaceName;
}
}
# Generate the actual manifest # Generate the actual manifest
my $oActualManifest = new BackRest::Manifest("${strTestPath}/actual.manifest", false); my $oActualManifest = new BackRest::Manifest("${strTestPath}/actual.manifest", false);
my $oTablespaceMapRef = undef; my $oTablespaceMapRef = undef;
$oActualManifest->build($oFile, ${$oExpectedManifestRef}{'backup:path'}{'base'}, $oLastManifest, true, undef); $oActualManifest->build($oFile, ${$oExpectedManifestRef}{'backup:path'}{'base'}, $oLastManifest, $bSynthetic, \%oTablespaceMap);
# Generate checksums for all files if required # Generate checksums for all files if required
# Also fudge size if this is a synthetic test - sizes may change during backup. # Also fudge size if this is a synthetic test - sizes may change during backup.
@ -1303,6 +1349,8 @@ sub BackRestTestBackup_RestoreCompare
# Create all paths in the manifest that do not already exist # Create all paths in the manifest that do not already exist
my $strSection = "${strSectionPathKey}:file"; my $strSection = "${strSectionPathKey}:file";
if ($oActualManifest->test($strSection))
{
foreach my $strName ($oActualManifest->keys($strSection)) foreach my $strName ($oActualManifest->keys($strSection))
{ {
if (!$bSynthetic) if (!$bSynthetic)
@ -1317,6 +1365,7 @@ sub BackRestTestBackup_RestoreCompare
} }
} }
} }
}
# Set actual to expected for settings that always change from backup to backup # Set actual to expected for settings that always change from backup to backup
$oActualManifest->set(MANIFEST_SECTION_BACKUP_OPTION, MANIFEST_KEY_COMPRESS, undef, $oActualManifest->set(MANIFEST_SECTION_BACKUP_OPTION, MANIFEST_KEY_COMPRESS, undef,
@ -2008,7 +2057,7 @@ sub BackRestTestBackup_Test
undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef, undef,
'add and delete files'); 'add and delete files');
# Incr backup - add a tablespace # Incr backup
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
$strType = 'incr'; $strType = 'incr';
BackRestTestBackup_ManifestReference(\%oManifest, $strFullBackup); BackRestTestBackup_ManifestReference(\%oManifest, $strFullBackup);
@ -2073,7 +2122,7 @@ sub BackRestTestBackup_Test
'cannot resume - disabled', TEST_BACKUP_NORESUME, undef, undef, 'cannot resume - disabled', TEST_BACKUP_NORESUME, undef, undef,
'--no-resume'); '--no-resume');
# Restore - # Restore
#----------------------------------------------------------------------------------------------------------------------- #-----------------------------------------------------------------------------------------------------------------------
$bDelta = false; $bDelta = false;
@ -2194,6 +2243,15 @@ sub BackRestTestBackup_Test
'cafac3c59553f2cfde41ce2e62e7662295f108c0', $lTime); 'cafac3c59553f2cfde41ce2e62e7662295f108c0', $lTime);
$strBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, $bRemote, $oFile, \%oManifest, 'add files'); $strBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, $bRemote, $oFile, \%oManifest, 'add files');
# Restore
#-----------------------------------------------------------------------------------------------------------------------
$bDelta = true;
BackRestTestBackup_Restore($oFile, $strBackup, $strStanza, $bRemote, undef, undef, $bDelta, $bForce,
undef, undef, undef, undef, undef, undef,
'no tablespace remap', undef, '--no-tablespace', false);
} }
} }
} }
@ -2330,6 +2388,10 @@ sub BackRestTestBackup_Test
$strTestPoint = TEST_MANIFEST_BUILD; $strTestPoint = TEST_MANIFEST_BUILD;
$strComment = 'update during backup'; $strComment = 'update during backup';
BackRestTestBackup_PgExecuteNoTrans("create tablespace ts1 location '" .
BackRestTestCommon_DbTablespacePathGet(1) . "'");
BackRestTestBackup_PgExecute("alter table test set tablespace ts1", true);
BackRestTestBackup_PgExecute("create table test_remove (id int)", false); BackRestTestBackup_PgExecute("create table test_remove (id int)", false);
BackRestTestBackup_PgSwitchXlog(); BackRestTestBackup_PgSwitchXlog();
BackRestTestBackup_PgExecute("update test set message = '$strDefaultMessage'", false); BackRestTestBackup_PgExecute("update test set message = '$strDefaultMessage'", false);
@ -2403,6 +2465,8 @@ sub BackRestTestBackup_Test
# Drop and recreate db path # Drop and recreate db path
BackRestTestCommon_PathRemove(BackRestTestCommon_DbCommonPathGet()); BackRestTestCommon_PathRemove(BackRestTestCommon_DbCommonPathGet());
BackRestTestCommon_PathCreate(BackRestTestCommon_DbCommonPathGet()); BackRestTestCommon_PathCreate(BackRestTestCommon_DbCommonPathGet());
BackRestTestCommon_PathRemove(BackRestTestCommon_DbTablespacePathGet(1));
BackRestTestCommon_PathCreate(BackRestTestCommon_DbTablespacePathGet(1));
# Now the restore should work # Now the restore should work
$strComment = undef; $strComment = undef;
@ -2434,7 +2498,7 @@ sub BackRestTestBackup_Test
BackRestTestBackup_Restore($oFile, $strIncrBackup, $strStanza, $bRemote, undef, undef, $bDelta, $bForce, BackRestTestBackup_Restore($oFile, $strIncrBackup, $strStanza, $bRemote, undef, undef, $bDelta, $bForce,
$strType, $strTarget, $bTargetExclusive, $bTargetResume, $strTargetTimeline, $strType, $strTarget, $bTargetExclusive, $bTargetResume, $strTargetTimeline,
$oRecoveryHashRef, $strComment, $iExpectedExitStatus); $oRecoveryHashRef, $strComment, $iExpectedExitStatus, '--no-tablespace', false);
# Save recovery file to test so we can use it in the next test # Save recovery file to test so we can use it in the next test
$oFile->copy(PATH_ABSOLUTE, BackRestTestCommon_DbCommonPathGet() . '/recovery.conf', $oFile->copy(PATH_ABSOLUTE, BackRestTestCommon_DbCommonPathGet() . '/recovery.conf',

View File

@ -96,6 +96,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -106,6 +107,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -356,6 +359,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -383,6 +389,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -662,3 +670,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> ../bin/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -96,6 +96,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -106,6 +107,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -407,6 +410,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -434,6 +440,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -801,3 +809,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> ../bin/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -98,6 +98,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -108,6 +109,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -359,6 +362,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -386,6 +392,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -665,3 +673,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> ../bin/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -98,6 +98,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -108,6 +109,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -410,6 +413,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -437,6 +443,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -804,3 +812,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> ../bin/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: local backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -96,6 +96,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -106,6 +107,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -356,6 +359,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -383,6 +389,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -662,3 +670,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -96,6 +96,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -106,6 +107,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -407,6 +410,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -434,6 +440,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -801,3 +809,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -98,6 +98,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -108,6 +109,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -359,6 +362,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -386,6 +392,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -665,3 +673,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads

View File

@ -98,6 +98,7 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/link-test
DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:/test to db:absolute:[TEST_PATH]/db/common/link-test, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1 DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common/base/base1.txt, compressed = false, hash_type = sha1
@ -108,6 +109,8 @@ restore delta, backup '[BACKUP_LABEL]' (add and delete files)
DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/common/PG_VERSION.backrest.tmp to absolute:[TEST_PATH]/db/common/PG_VERSION, destination_path_create = false
INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482 INFO: [TEST_PATH]/db/common/PG_VERSION restore (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common/recovery.conf
INFO: wrote [TEST_PATH]/db/common/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add tablespace 1) incr backup (add tablespace 1)
@ -410,6 +413,9 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts1-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/1, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2 DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true DEBUG: File->link_create: db:absolute:[TEST_PATH]/db/tablespace/ts2-2 to db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, hard = false, relative = false, destination_path_create = true
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts1-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/tablespace/ts2-2
DEBUG: starting restore in main process DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP] DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/base/badchecksum.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
@ -437,6 +443,8 @@ restore, backup '[BACKUP_LABEL]', remap (remap all paths)
DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false DEBUG: File->move: absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578 INFO: [TEST_PATH]/db/tablespace/ts2-2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
incr backup (add files and remove tablespace 2) incr backup (add files and remove tablespace 2)
@ -804,3 +812,58 @@ diff backup (add files)
DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef] DEBUG: File->path_create: backup:absolute:[TEST_PATH]/backrest/backup/db, mode [undef]
INFO: archive rentention type not set - archive logs will not be expired INFO: archive rentention type not set - archive logs will not be expired
DEBUG: safe exit called, terminating threads DEBUG: safe exit called, terminating threads
restore delta, backup '[BACKUP_LABEL]' (no tablespace remap)
> [BACKREST_BIN_PATH]/pg_backrest.pl --config=[TEST_PATH]/db/pg_backrest.conf --delta --set=[BACKUP_LABEL] --no-tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/postmaster.pid
INFO: Restoring backup set [BACKUP_LABEL]
DEBUG: File->exists: backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/backup.manifest to local db:absolute:[TEST_PATH]/db/common-2/backup.manifest, source_compressed = false, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [undef], mode = [undef], user = [undef], group = [undef]
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/backup.manifest.backrest.tmp to absolute:[TEST_PATH]/db/common-2/backup.manifest, destination_path_create = false
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/backup.manifest
INFO: remapping tablespace 2 to [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->manifest: db:absolute:[TEST_PATH]/db/common-2
INFO: removing file/link [TEST_PATH]/db/common-2/pg_tblspc/2
INFO: checking/cleaning db path [TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
INFO: 1 file(s) removed during cleanup
INFO: 1 link(s) removed during cleanup
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/path-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: File->path_create: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2, mode 0700
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/link-test
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2
DEBUG: starting restore in main process
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/badchecksum.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/badchecksum.txt exists and matches backup (11B, 21%) checksum f927212cd08d11a42a666b2f04235398e9ceeb51
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base2.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base2.txt exists and matches backup (9B, 39%) checksum cafac3c59553f2cfde41ce2e62e7662295f108c0
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/base/base1.txt, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/base/base1.txt exists and matches backup (9B, 56%) checksum 7579ada0808d7f98087a0a586d0df9de009cdc33
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION
DEBUG: File->hash: db:absolute:[TEST_PATH]/db/common-2/PG_VERSION, compressed = false, hash_type = sha1
INFO: [TEST_PATH]/db/common-2/PG_VERSION exists and matches backup (3B, 62%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2c.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2c.txt restore (12B, 86%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt
DEBUG: File->copy: remote backup:cluster:[TEST_PATH]/backrest/backup/db/[BACKUP_LABEL]/tablespace/2/tablespace2.txt.gz to local db:absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, source_compressed = true, destination_compress = false, ignore_missing_source = false, destination_path_create = false, modification_time = [MODIFICATION_TIME], mode = 0600, user = [USER], group = [GROUP]
DEBUG: File->owner: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp, user = [USER] = staff
DEBUG: File->move: absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt.backrest.tmp to absolute:[TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt, destination_path_create = false
INFO: [TEST_PATH]/db/common-2/pg_tblspc/2/tablespace2.txt restore (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
DEBUG: File->exists: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
DEBUG: File->remove: db:absolute:[TEST_PATH]/db/common-2/recovery.conf
INFO: wrote [TEST_PATH]/db/common-2/recovery.conf
INFO: restore complete
DEBUG: safe exit called, terminating threads