1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-10-30 23:37:45 +02:00

The restore command is implemented entirely in C.

For the most part this is a direct migration of the Perl code into C.

There is one important behavioral change with regard to how file permissions are handled.  The Perl code tried to set ownership as it was in the manifest even when running as an unprivileged user.  This usually just led to errors and frustration.

The C code works like this:

If a restore is run as a non-root user (the typical scenario) then all files restored will belong to the user/group executing pgBackRest. If existing files are not owned by the executing user/group then an error will result if the ownership cannot be updated to the executing user/group. In that case the file ownership will need to be updated by a privileged user before the restore can be retried.

If a restore is run as the root user then pgBackRest will attempt to recreate the ownership recorded in the manifest when the backup was made. Only user/group names are stored in the manifest so the same names must exist on the restore host for this to work. If the user/group name cannot be found locally then the user/group of the PostgreSQL data directory will be used and finally root if the data directory user/group cannot be mapped to a name.

Reviewed by Cynthia Shang.
This commit is contained in:
David Steele
2019-09-26 07:52:02 -04:00
parent 92e48c856a
commit 451ae397be
20 changed files with 4162 additions and 3057 deletions

View File

@@ -14,6 +14,16 @@
<release-list>
<release date="XXXX-XX-XX" version="2.18dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-improvement-list>
<release-item>
<release-item-contributor-list>
<release-item-reviewer id="cynthia.shang"/>
</release-item-contributor-list>
<p>The <cmd>restore</cmd> command is implemented entirely in C.</p>
</release-item>
</release-improvement-list>
<release-development-list>
<release-item>
<release-item-contributor-list>

View File

@@ -1644,6 +1644,15 @@
<p>The Restore section introduces additional <cmd>restore</cmd> command features.</p>
<!-- ******************************************************************************************************************* -->
<section id="ownership">
<title>File Ownership</title>
<p>If a <cmd>restore</cmd> is run as a non-root user (the typical scenario) then all files restored will belong to the user/group executing <backrest/>. If existing files are not owned by the executing user/group then an error will result if the ownership cannot be updated to the executing user/group. In that case the file ownership will need to be updated by a privileged user before the restore can be retried.</p>
<p>If a <cmd>restore</cmd> is run as the <id>root</id> user then <backrest/> will attempt to recreate the ownership recorded in the manifest when the backup was made. Only user/group <b>names</b> are stored in the manifest so the same names must exist on the restore host for this to work. If the user/group name cannot be found locally then the user/group of the <postgres/> data directory will be used and finally <id>root</id> if the data directory user/group cannot be mapped to a name.</p>
</section>
<!-- SECTION => RESTORE - DELTA -->
<section id="option-delta">
<title>Delta Option</title>
@@ -1660,7 +1669,7 @@
<execute user="postgres" output="y" filter="y">
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta
--log-level-console=detail restore</exe-cmd>
<exe-highlight>demo\/PG_VERSION - exists and matches backup|check\/clean db path|restore global\/pg_control</exe-highlight>
<exe-highlight>demo\/PG_VERSION - exists and matches backup|remove invalid files|rename global\/pg_control</exe-highlight>
</execute>
</execute-list>

View File

@@ -134,53 +134,32 @@ sub main
storageLocal(),
cfgOption(CFGOPT_LOG_PATH) . '/' . cfgOption(CFGOPT_STANZA) . '-' . lc(cfgCommandName(cfgCommandGet())));
# Process restore command
# ----------------------------------------------------------------------------------------------------------------------
if (cfgCommandTest(CFGCMD_RESTORE))
# Check if processes have been stopped
lockStopTest();
# Check locality
if (!isRepoLocal())
{
# Check locality
if (!isDbLocal())
{
confess &log(ERROR,
cfgCommandName(cfgCommandGet()) . ' command must be run on the PostgreSQL host', ERROR_HOST_INVALID);
}
# Load module dynamically
require pgBackRest::Restore;
pgBackRest::Restore->import();
# Do the restore
new pgBackRest::Restore()->process();
confess &log(ERROR,
cfgCommandName(cfgCommandGet()) . ' command must be run on the repository host', ERROR_HOST_INVALID);
}
else
# Process backup command
# ----------------------------------------------------------------------------------------------------------------------
if (cfgCommandTest(CFGCMD_BACKUP))
{
# Check if processes have been stopped
lockStopTest();
# Load module dynamically
require pgBackRest::Backup::Backup;
pgBackRest::Backup::Backup->import();
# Check locality
if (!isRepoLocal())
{
confess &log(ERROR,
cfgCommandName(cfgCommandGet()) . ' command must be run on the repository host', ERROR_HOST_INVALID);
}
new pgBackRest::Backup::Backup()->process();
}
# Process backup command
# ------------------------------------------------------------------------------------------------------------------
if (cfgCommandTest(CFGCMD_BACKUP))
{
# Load module dynamically
require pgBackRest::Backup::Backup;
pgBackRest::Backup::Backup->import();
new pgBackRest::Backup::Backup()->process();
}
# Process expire command
# --------------------------------------------------------------------------------------------------------------
elsif (cfgCommandTest(CFGCMD_EXPIRE))
{
new pgBackRest::Backup::Info(storageRepo()->pathGet(STORAGE_REPO_BACKUP));
}
# Process expire command
# ----------------------------------------------------------------------------------------------------------------------
elsif (cfgCommandTest(CFGCMD_EXPIRE))
{
new pgBackRest::Backup::Info(storageRepo()->pathGet(STORAGE_REPO_BACKUP));
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,97 +0,0 @@
####################################################################################################################################
# RESTORE FILE MODULE
####################################################################################################################################
package pgBackRest::RestoreFile;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
use Fcntl qw(:mode);
use File::Basename qw(dirname);
use File::stat qw(lstat);
use pgBackRest::Common::Exception;
use pgBackRest::Common::Io::Handle;
use pgBackRest::Common::Log;
use pgBackRest::Common::String;
use pgBackRest::Config::Config;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Storage::Helper;
use pgBackRest::Storage::Helper;
####################################################################################################################################
# restoreLog
#
# Log a restored file.
####################################################################################################################################
sub restoreLog
{
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$iLocalId,
$strDbFile,
$lSize,
$lModificationTime,
$strChecksum,
$bZero,
$bForce,
$bCopy,
$lSizeTotal,
$lSizeCurrent,
) =
logDebugParam
(
__PACKAGE__ . '::restoreLog', \@_,
{name => 'iLocalId', required => false},
{name => 'strDbFile'},
{name => 'lSize'},
{name => 'lModificationTime'},
{name => 'strChecksum', required => false},
{name => 'bZero', required => false, default => false},
{name => 'bForce'},
{name => 'bCopy'},
{name => 'lSizeTotal'},
{name => 'lSizeCurrent'},
);
# If the file was not copied then create a log entry to explain why
my $strLog;
if (!$bCopy && !$bZero)
{
if ($bForce)
{
$strLog = 'exists and matches size ' . $lSize . ' and modification time ' . $lModificationTime;
}
else
{
$strLog = 'exists and ' . ($lSize == 0 ? 'is zero size' : 'matches backup');
}
}
# Log the restore
$lSizeCurrent += $lSize;
&log($bCopy ? INFO : DETAIL,
'restore' . ($bZero ? ' zeroed' : '') .
" file ${strDbFile}" . (defined($strLog) ? " - ${strLog}" : '') .
' (' . fileSizeFormat($lSize) .
($lSizeTotal > 0 ? ', ' . int($lSizeCurrent * 100 / $lSizeTotal) . '%' : '') . ')' .
($lSize != 0 && !$bZero ? " checksum ${strChecksum}" : ''), undef, undef, undef, $iLocalId);
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'lSizeCurrent', value => $lSizeCurrent, trace => true}
);
}
push @EXPORT, qw(restoreLog);
1;

View File

@@ -67,6 +67,7 @@ SRCS = \
command/local/local.c \
command/restore/file.c \
command/restore/protocol.c \
command/restore/restore.c \
command/remote/remote.c \
command/stanza/common.c \
command/stanza/create.c \
@@ -283,6 +284,9 @@ command/restore/file.o: command/restore/file.c build.auto.h command/restore/file
command/restore/protocol.o: command/restore/protocol.c build.auto.h command/restore/file.h command/restore/protocol.h common/assert.h common/crypto/common.h common/debug.h common/error.auto.h common/error.h common/io/filter/filter.h common/io/filter/group.h common/io/io.h common/io/read.h common/io/write.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h protocol/server.h storage/helper.h storage/info.h storage/read.h storage/storage.h storage/write.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CMAKE) -c command/restore/protocol.c -o command/restore/protocol.o
command/restore/restore.o: command/restore/restore.c build.auto.h command/backup/common.h command/restore/protocol.h command/restore/restore.h common/assert.h common/crypto/cipherBlock.h common/crypto/common.h common/crypto/hash.h common/debug.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/io/write.intern.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/regExp.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h common/user.h config/config.auto.h config/config.h config/define.auto.h config/define.h config/exec.h info/info.h info/infoBackup.h info/infoPg.h info/manifest.h postgres/interface.h postgres/version.h protocol/client.h protocol/command.h protocol/helper.h protocol/parallel.h protocol/parallelJob.h protocol/server.h storage/helper.h storage/info.h storage/read.h storage/storage.h storage/write.h storage/write.intern.h version.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CMAKE) -c command/restore/restore.c -o command/restore/restore.o
command/stanza/common.o: command/stanza/common.c build.auto.h command/check/common.h common/assert.h common/crypto/common.h common/debug.h common/encode.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h db/db.h db/helper.h info/info.h info/infoPg.h postgres/client.h postgres/interface.h postgres/version.h protocol/client.h protocol/command.h storage/helper.h storage/info.h storage/read.h storage/storage.h storage/write.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CMAKE) -c command/stanza/common.c -o command/stanza/common.o
@@ -493,7 +497,7 @@ info/infoPg.o: info/infoPg.c build.auto.h common/assert.h common/crypto/common.h
info/manifest.o: info/manifest.c build.auto.h command/backup/common.h common/assert.h common/crypto/cipherBlock.h common/crypto/common.h common/crypto/hash.h common/debug.h common/error.auto.h common/error.h common/ini.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/json.h common/type/keyValue.h common/type/list.h common/type/mcv.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h info/info.h info/manifest.h postgres/interface.h postgres/version.h storage/info.h storage/read.h storage/storage.h storage/write.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CMAKE) -c info/manifest.c -o info/manifest.o
main.o: main.c build.auto.h command/archive/get/get.h command/archive/push/push.h command/check/check.h command/command.h command/control/start.h command/control/stop.h command/expire/expire.h command/help/help.h command/info/info.h command/local/local.h command/remote/remote.h command/stanza/create.h command/stanza/delete.h command/stanza/upgrade.h command/storage/list.h common/assert.h common/debug.h common/error.auto.h common/error.h common/exit.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h config/load.h perl/exec.h postgres/interface.h storage/helper.h storage/info.h storage/read.h storage/storage.h storage/write.h version.h
main.o: main.c build.auto.h command/archive/get/get.h command/archive/push/push.h command/check/check.h command/command.h command/control/start.h command/control/stop.h command/expire/expire.h command/help/help.h command/info/info.h command/local/local.h command/remote/remote.h command/restore/restore.h command/stanza/create.h command/stanza/delete.h command/stanza/upgrade.h command/storage/list.h common/assert.h common/debug.h common/error.auto.h common/error.h common/exit.h common/io/filter/filter.h common/io/filter/group.h common/io/read.h common/io/write.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h config/load.h perl/exec.h postgres/interface.h storage/helper.h storage/info.h storage/read.h storage/storage.h storage/write.h version.h
$(CC) $(CPPFLAGS) $(CFLAGS) $(CMAKE) -c main.c -o main.o
perl/config.o: perl/config.c build.auto.h common/assert.h common/debug.h common/error.auto.h common/error.h common/lock.h common/log.h common/logLevel.h common/memContext.h common/stackTrace.h common/time.h common/type/buffer.h common/type/convert.h common/type/json.h common/type/keyValue.h common/type/list.h common/type/string.h common/type/stringList.h common/type/variant.h common/type/variantList.h config/config.auto.h config/config.h config/define.auto.h config/define.h

View File

@@ -44,15 +44,14 @@ restoreProtocol(const String *command, const VariantList *paramList, ProtocolSer
protocolServerResponse(
server,
VARBOOL(
restoreFile(varStr(varLstGet(paramList, 6)),
varLstGet(paramList, 7) ? varStr(varLstGet(paramList, 7)) : varStr(varLstGet(paramList, 13)),
varBoolForce(varLstGet(paramList, 14)), varStr(varLstGet(paramList, 0)), varStr(varLstGet(paramList, 3)),
varBoolForce(varLstGet(paramList, 4)), varUInt64(varLstGet(paramList, 1)),
(time_t)varInt64Force(varLstGet(paramList, 2)), cvtZToUIntBase(strPtr(varStr(varLstGet(paramList, 8))), 8),
varStr(varLstGet(paramList, 9)), varStr(varLstGet(paramList, 10)),
(time_t)varInt64Force(varLstGet(paramList, 11)), varBoolForce(varLstGet(paramList, 12)),
varBoolForce(varLstGet(paramList, 5)),
varLstSize(paramList) == 16 ? varStr(varLstGet(paramList, 15)) : NULL)));
restoreFile(
varStr(varLstGet(paramList, 0)), varStr(varLstGet(paramList, 1)), varBoolForce(varLstGet(paramList, 2)),
varStr(varLstGet(paramList, 3)), varStr(varLstGet(paramList, 4)), varBoolForce(varLstGet(paramList, 5)),
varUInt64(varLstGet(paramList, 6)), (time_t)varInt64Force(varLstGet(paramList, 7)),
cvtZToUIntBase(strPtr(varStr(varLstGet(paramList, 8))), 8), varStr(varLstGet(paramList, 9)),
varStr(varLstGet(paramList, 10)), (time_t)varInt64Force(varLstGet(paramList, 11)),
varBoolForce(varLstGet(paramList, 12)), varBoolForce(varLstGet(paramList, 13)),
varStr(varLstGet(paramList, 14)))));
}
else
found = false;

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,12 @@
/***********************************************************************************************************************************
Restore Command
***********************************************************************************************************************************/
#ifndef COMMAND_RESTORE_RESTORE_H
#define COMMAND_RESTORE_RESTORE_H
/***********************************************************************************************************************************
Functions
***********************************************************************************************************************************/
void cmdRestore(void);
#endif

View File

@@ -18,6 +18,7 @@ Main
#include "command/info/info.h"
#include "command/local/local.h"
#include "command/remote/remote.h"
#include "command/restore/restore.h"
#include "command/stanza/create.h"
#include "command/stanza/delete.h"
#include "command/stanza/upgrade.h"
@@ -190,7 +191,7 @@ main(int argListSize, const char *argList[])
// -----------------------------------------------------------------------------------------------------------------
case cfgCmdRestore:
{
perlExec();
cmdRestore();
break;
}

File diff suppressed because it is too large Load Diff

View File

@@ -17,6 +17,12 @@ PostgreSQL Interface
/***********************************************************************************************************************************
Defines for various Postgres paths and files
***********************************************************************************************************************************/
STRING_EXTERN(PG_FILE_PGVERSION_STR, PG_FILE_PGVERSION);
STRING_EXTERN(PG_FILE_POSTMASTERPID_STR, PG_FILE_POSTMASTERPID);
STRING_EXTERN(PG_FILE_RECOVERYCONF_STR, PG_FILE_RECOVERYCONF);
STRING_EXTERN(PG_PATH_GLOBAL_STR, PG_PATH_GLOBAL);
STRING_EXTERN(PG_NAME_WAL_STR, PG_NAME_WAL);
STRING_EXTERN(PG_NAME_XLOG_STR, PG_NAME_XLOG);

View File

@@ -14,10 +14,18 @@ PostgreSQL Interface
Defines for various Postgres paths and files
***********************************************************************************************************************************/
#define PG_FILE_PGCONTROL "pg_control"
#define PG_FILE_PGVERSION "PG_VERSION"
STRING_DECLARE(PG_FILE_PGVERSION_STR);
#define PG_FILE_POSTMASTERPID "postmaster.pid"
STRING_DECLARE(PG_FILE_POSTMASTERPID_STR);
#define PG_FILE_RECOVERYCONF "recovery.conf"
STRING_DECLARE(PG_FILE_RECOVERYCONF_STR);
#define PG_FILE_TABLESPACEMAP "tablespace_map"
#define PG_PATH_ARCHIVE_STATUS "archive_status"
#define PG_PATH_BASE "base"
#define PG_PATH_GLOBAL "global"
STRING_DECLARE(PG_PATH_GLOBAL_STR);
#define PG_NAME_WAL "wal"
STRING_DECLARE(PG_NAME_WAL_STR);
@@ -37,6 +45,13 @@ Page size can only be changed at compile time and is not known to be well-tested
***********************************************************************************************************************************/
#define PG_PAGE_SIZE_DEFAULT ((unsigned int)(8 * 1024))
/***********************************************************************************************************************************
Define the minimum oid that can be used for a user object
Everything below this number should have been created at initdb time.
***********************************************************************************************************************************/
#define PG_USER_OBJECT_MIN_ID 16384
/***********************************************************************************************************************************
Define default segment size and pages per segment

View File

@@ -38,6 +38,15 @@ Version where various PostgreSQL capabilities were introduced
// pg_create_restore_point() supported
#define PG_VERSION_RESTORE_POINT PG_VERSION_91
// pause_at_recovery_target is supported
#define PG_VERSION_RECOVERY_TARGET_PAUSE PG_VERSION_91
// tablespace_map is created during backup
#define PG_VERSION_TABLESPACE_MAP PG_VERSION_95
// recovery target action supported
#define PG_VERSION_RECOVERY_TARGET_ACTION PG_VERSION_95
// xlog was renamed to wal
#define PG_VERSION_WAL_RENAME PG_VERSION_10

View File

@@ -693,11 +693,18 @@ unit:
# ----------------------------------------------------------------------------------------------------------------------------
- name: restore
total: 1
total: 10
perlReq: true
coverage:
command/restore/file: full
command/restore/protocol: full
command/restore/restore: full
include:
- common/user
- info/infoBackup
- info/manifest
# ----------------------------------------------------------------------------------------------------------------------------
- name: stanza

View File

@@ -561,47 +561,41 @@ restore delta, backup '[BACKUP-FULL-2]' - add and delete files (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --link-all --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-2]
P00 WARN: backup group for pg_data was not mapped to a name, set to [GROUP-2]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-2]
P00 WARN: backup user for pg_data was not mapped to a name, set to [USER-2]
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_stat exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_stat
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/recovery.done
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/postmaster.opts
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/postgresql.auto.conf.tmp
P00 DETAIL: remove link [TEST_PATH]/db-master/db/base/postgresql.auto.conf
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_subtrans/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_stat_tmp/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_snapshots/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_serial/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_replslot/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_notify/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_log2/logfile
P00 DETAIL: remove path [TEST_PATH]/db-master/db/base/pg_log2
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_log/logfile
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/pg_dynshmem/anything.tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/global/pg_internal.init
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/deleteme/deleteme.txt
P00 DETAIL: remove path [TEST_PATH]/db-master/db/base/deleteme
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/base/pgsql_tmp/pgsql_tmp.1
P00 DETAIL: remove path [TEST_PATH]/db-master/db/base/base/pgsql_tmp
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/base/32768/t333_44000
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/base/32768/44000
P00 DETAIL: set ownership [USER-1]:[GROUP-2] on [TEST_PATH]/db-master/db/base/base/16384/PG_VERSION
P00 DETAIL: set ownership [USER-2]:[GROUP-1] on [TEST_PATH]/db-master/db/base/base/1/PG_VERSION
P00 DETAIL: set mode 0660 on [TEST_PATH]/db-master/db/base/base/1/PG_VERSION
P00 DETAIL: set mode 0700 on [TEST_PATH]/db-master/db/base/base
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/backup_label.old
P00 DETAIL: remove file [TEST_PATH]/db-master/db/base/apipe
P00 INFO: cleanup removed 19 files, 1 link, 3 paths
P00 WARN: unknown user in backup manifest mapped to '[USER-2]'
P00 WARN: unknown group in backup manifest mapped to '[GROUP-2]'
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_config' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_stat' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 DETAIL: update ownership for '[TEST_PATH]/db-master/db/base'
P00 DETAIL: remove special file '[TEST_PATH]/db-master/db/base/apipe'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/backup_label.old'
P00 DETAIL: update mode for '[TEST_PATH]/db-master/db/base/base' to 0700
P00 DETAIL: update ownership for '[TEST_PATH]/db-master/db/base/base/1/PG_VERSION'
P00 DETAIL: update mode for '[TEST_PATH]/db-master/db/base/base/1/PG_VERSION' to 0660
P00 DETAIL: update ownership for '[TEST_PATH]/db-master/db/base/base/16384/PG_VERSION'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/base/32768/44000'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/base/32768/t333_44000'
P00 DETAIL: remove invalid path '[TEST_PATH]/db-master/db/base/base/pgsql_tmp'
P00 DETAIL: remove invalid path '[TEST_PATH]/db-master/db/base/deleteme'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/global/pg_internal.init'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_dynshmem/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_log/logfile'
P00 DETAIL: remove invalid path '[TEST_PATH]/db-master/db/base/pg_log2'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_notify/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_replslot/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_serial/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_snapshots/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_stat_tmp/anything.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/pg_subtrans/anything.tmp'
P00 DETAIL: remove invalid link '[TEST_PATH]/db-master/db/base/postgresql.auto.conf'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/postgresql.auto.conf.tmp'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/postmaster.opts'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.conf'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.done'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/pg_stat'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_clog'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 - exists and matches backup (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init - exists and matches backup (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 - exists and matches backup (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -621,7 +615,25 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/PG_VERSION - exists and m
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/zero_from_start - exists and is zero size (0B, 100%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? - exists and is zero size (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/pg_config'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
@@ -633,19 +645,17 @@ restore delta, backup '[BACKUP-FULL-2]' - fix permissions (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --link-all --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_stat exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_stat
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: set ownership [USER-1]:[GROUP-1] on [TEST_PATH]/db-master/db/base/base/16384/PG_VERSION
P00 DETAIL: set ownership [USER-1]:[GROUP-1] on [TEST_PATH]/db-master/db/base/base/1/PG_VERSION
P00 WARN: unknown user in backup manifest mapped to '[USER-1]'
P00 WARN: unknown group in backup manifest mapped to '[GROUP-1]'
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_config' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_stat' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 DETAIL: update ownership for '[TEST_PATH]/db-master/db/base/base/1/PG_VERSION'
P00 DETAIL: update ownership for '[TEST_PATH]/db-master/db/base/base/16384/PG_VERSION'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/pg_stat'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 - exists and matches backup (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init - exists and matches backup (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 - exists and matches backup (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -665,30 +675,47 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/PG_VERSION - exists and m
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/zero_from_start - exists and is zero size (0B, 100%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? - exists and is zero size (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/pg_config'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
----------------------------------------------------------------
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=detail --stanza=db archive-get %f "%p"'
restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db archive-get %f "%p"'
restore delta, backup '[BACKUP-FULL-2]' - fix broken symlink (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-FULL-2] --link-all --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --link-all --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_stat exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_stat
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: remove link [TEST_PATH]/db-master/db/base/pg_stat - destination changed
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_config' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_stat' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 DETAIL: remove link '[TEST_PATH]/db-master/db/base/pg_stat' because destination changed
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/pg_stat'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base/pg_stat' to '../pg_stat'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 - exists and matches backup (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init - exists and matches backup (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 - exists and matches backup (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -708,7 +735,25 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/PG_VERSION - exists and m
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/zero_from_start - exists and is zero size (0B, 100%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? - exists and is zero size (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/pg_config'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
@@ -720,20 +765,18 @@ restore delta, backup '[BACKUP-FULL-2]' - restore all links by mapping (db-maste
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --link-map=pg_stat=../pg_stat --link-map=postgresql.conf=../pg_config/postgresql.conf --link-map=pg_hba.conf=../pg_config/pg_hba.conf --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 INFO: remap link pg_data/pg_hba.conf destination to ../pg_config/pg_hba.conf
P00 INFO: remap link pg_data/pg_stat destination to ../pg_stat
P00 INFO: remap link pg_data/postgresql.conf destination to ../pg_config/postgresql.conf
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_stat exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_stat
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base/recovery.conf
P00 INFO: map link 'pg_hba.conf' to '../pg_config/pg_hba.conf'
P00 INFO: map link 'pg_stat' to '../pg_stat'
P00 INFO: map link 'postgresql.conf' to '../pg_config/postgresql.conf'
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_config' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_stat' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/pg_stat'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 - exists and matches backup (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init - exists and matches backup (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 - exists and matches backup (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -753,7 +796,25 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/PG_VERSION - exists and m
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/zero_from_start - exists and is zero size (0B, 100%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? - exists and is zero size (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/pg_config'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
@@ -763,24 +824,24 @@ restore_command = '[BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf
restore delta, backup '[BACKUP-FULL-2]', expect exit 70 - restore all links by mapping (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --set=[BACKUP-FULL-2] --log-level-console=warn --link-map=pg_stat=../pg_stat --link-map=postgresql.conf=../pg_stat/postgresql.conf --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 WARN: file link pg_hba.conf will be restored as a file at the same location
P00 ERROR: [070]: link [TEST_PATH]/db-master/db/base/postgresql.conf (../pg_stat) references a subdirectory of or the same directory as link [TEST_PATH]/db-master/db/base/pg_stat (../pg_stat)
P00 WARN: file link 'pg_hba.conf' will be restored as a file at the same location
P00 ERROR: [070]: link 'pg_stat' ([TEST_PATH]/db-master/db/pg_stat) destination is a subdirectory of or the same directory as link 'postgresql.conf' ([TEST_PATH]/db-master/db/pg_stat)
restore, backup '[BACKUP-FULL-2]', expect exit 40 - error on existing linked file (db-master host)
restore, backup '[BACKUP-FULL-2]', expect exit 93 - error on existing linked file (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --set=[BACKUP-FULL-2] --log-level-console=warn --link-all --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 ERROR: [040]: cannot restore file '[TEST_PATH]/db-master/db/pg_config/pg_hba.conf' that already exists - try using --delta if this is what you intended
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 ERROR: [093]: unable to restore file '[TEST_PATH]/db-master/db/pg_config/pg_hba.conf' because it already exists
HINT: try using --delta if this is what you intended.
restore, backup '[BACKUP-FULL-2]', expect exit 40 - error on existing linked path (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --set=[BACKUP-FULL-2] --log-level-console=warn --link-all --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 ERROR: [040]: cannot restore to path '[TEST_PATH]/db-master/db/pg_stat' that contains files - try using --delta if this is what you intended
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 ERROR: [040]: unable to restore to path '[TEST_PATH]/db-master/db/pg_stat' because it contains files
HINT: try using --delta if this is what you intended.
restore, backup '[BACKUP-FULL-2]', expect exit 38 - error on postmaster.pid exists (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --set=[BACKUP-FULL-2] --log-level-console=warn --stanza=db restore
@@ -794,14 +855,32 @@ restore delta, backup '[BACKUP-FULL-2]' - restore all links --link-all and mappi
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --link-all --link-map=pg_stat=../pg_stat --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 INFO: remap link pg_data/pg_stat destination to ../pg_stat
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_stat exists
P00 DETAIL: check [TEST_PATH]/db-master/db/pg_config exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/pg_config
P00 INFO: map link 'pg_stat' to '../pg_stat'
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_config' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/pg_stat' exists
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/pg_stat'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/global'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base/pg_stat' to '../pg_stat'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base/pg_hba.conf' to '../pg_config/pg_hba.conf'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base/postgresql.conf' to '../pg_config/postgresql.conf'
P01 INFO: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 INFO: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 INFO: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -821,7 +900,25 @@ P01 INFO: restore file [TEST_PATH]/db-master/db/base/PG_VERSION (3B, 100%) che
P01 INFO: restore file [TEST_PATH]/db-master/db/base/zero_from_start (0B, 100%)
P01 INFO: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/pg_config'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
@@ -834,13 +931,14 @@ restore delta, force, backup '[BACKUP-FULL-2]', expect exit 40 - fail on missing
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --force --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 WARN: --delta or --force specified but unable to find 'PG_VERSION' or 'backup.manifest' in '[TEST_PATH]/db-master/db/base' to confirm that this is a valid $PGDATA directory. --delta and --force have been disabled and if any files exist in the destination directories the restore will be aborted.
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 WARN: file link pg_hba.conf will be restored as a file at the same location
P00 WARN: contents of directory link pg_stat will be restored in a directory at the same location
P00 WARN: file link postgresql.conf will be restored as a file at the same location
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 ERROR: [040]: cannot restore to path '[TEST_PATH]/db-master/db/base' that contains files - try using --delta if this is what you intended
P00 WARN: file link 'pg_hba.conf' will be restored as a file at the same location
P00 WARN: contents of directory link 'pg_stat' will be restored in a directory at the same location
P00 WARN: file link 'postgresql.conf' will be restored as a file at the same location
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 ERROR: [040]: unable to restore to path '[TEST_PATH]/db-master/db/base' because it contains files
HINT: try using --delta if this is what you intended.
P00 INFO: restore command end: aborted with exception [040]
restore delta, force, backup '[BACKUP-FULL-2]' - restore succeeds with backup.manifest file (db-master host)
@@ -848,20 +946,21 @@ restore delta, force, backup '[BACKUP-FULL-2]' - restore succeeds with backup.ma
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --force --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-FULL-2] --stanza=db
P00 INFO: restore backup set [BACKUP-FULL-2]
P00 WARN: backup group for pg_data/base/16384/PG_VERSION was not mapped to a name, set to [GROUP-1]
P00 WARN: group bogus in manifest cannot be used for restore, set to [USER-1]
P00 WARN: backup user for pg_data/base/1/PG_VERSION was not mapped to a name, set to [USER-1]
P00 WARN: user bogus in manifest cannot be used for restore, set to [USER-1]
P00 WARN: file link pg_hba.conf will be restored as a file at the same location
P00 WARN: contents of directory link pg_stat will be restored in a directory at the same location
P00 WARN: file link postgresql.conf will be restored as a file at the same location
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: remove link [TEST_PATH]/db-master/db/base/postgresql.conf
P00 DETAIL: remove link [TEST_PATH]/db-master/db/base/pg_stat
P00 DETAIL: remove link [TEST_PATH]/db-master/db/base/pg_hba.conf
P00 INFO: cleanup removed 3 links
P00 WARN: file link 'pg_hba.conf' will be restored as a file at the same location
P00 WARN: contents of directory link 'pg_stat' will be restored in a directory at the same location
P00 WARN: file link 'postgresql.conf' will be restored as a file at the same location
P00 WARN: unknown user in backup manifest mapped to current user
P00 WARN: unknown user 'bogus' in backup manifest mapped to current user
P00 WARN: unknown group in backup manifest mapped to current group
P00 WARN: unknown group 'bogus' in backup manifest mapped to current group
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base'
P00 DETAIL: remove invalid link '[TEST_PATH]/db-master/db/base/pg_hba.conf'
P00 DETAIL: remove invalid link '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: remove invalid link '[TEST_PATH]/db-master/db/base/postgresql.conf'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base/recovery.conf'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base/pg_stat'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33001 - exists and matches size 65536 and modification time [MODIFICATION-TIME-1] (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/44000_init - exists and matches size 32768 and modification time [MODIFICATION-TIME-1] (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/base/32768/33000.32767 - exists and matches size 32768 and modification time [MODIFICATION-TIME-1] (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -881,7 +980,24 @@ P01 INFO: restore file [TEST_PATH]/db-master/db/base/PG_VERSION (3B, 100%) che
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/zero_from_start - exists and matches size 0 and modification time [MODIFICATION-TIME-1] (0B, 100%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base/special-!_.*'()&!@;:+,? - exists and matches size 0 and modification time [MODIFICATION-TIME-1] (0B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/pg_tblspc'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
@@ -1821,8 +1937,9 @@ restore, backup '[BACKUP-DIFF-2]', expect exit 40 - fail on used path (db-master
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-DIFF-2] --stanza=db
P00 INFO: restore backup set [BACKUP-DIFF-2]
P00 DETAIL: check [TEST_PATH]/db-master/db/base exists
P00 ERROR: [040]: cannot restore to path '[TEST_PATH]/db-master/db/base' that contains files - try using --delta if this is what you intended
P00 DETAIL: check '[TEST_PATH]/db-master/db/base' exists
P00 ERROR: [040]: unable to restore to path '[TEST_PATH]/db-master/db/base' because it contains files
HINT: try using --delta if this is what you intended.
P00 INFO: restore command end: aborted with exception [040]
restore, backup '[BACKUP-DIFF-2]', remap - remap all paths (db-master host)
@@ -1830,12 +1947,33 @@ restore, backup '[BACKUP-DIFF-2]', remap - remap all paths (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2 --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-DIFF-2] --stanza=db --tablespace-map=1=[TEST_PATH]/db-master/db/tablespace/ts1-2 --tablespace-map=2=[TEST_PATH]/db-master/db/tablespace/ts2-2
P00 INFO: restore backup set [BACKUP-DIFF-2]
P00 INFO: remap $PGDATA directory to [TEST_PATH]/db-master/db/base-2
P00 INFO: remap tablespace pg_tblspc/1 directory to [TEST_PATH]/db-master/db/tablespace/ts1-2
P00 INFO: remap tablespace pg_tblspc/2 directory to [TEST_PATH]/db-master/db/tablespace/ts2-2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts1-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts2-2 exists
P00 INFO: remap data directory to '[TEST_PATH]/db-master/db/base-2'
P00 INFO: map tablespace 'pg_tblspc/1' to '[TEST_PATH]/db-master/db/tablespace/ts1-2'
P00 INFO: map tablespace 'pg_tblspc/2' to '[TEST_PATH]/db-master/db/tablespace/ts2-2'
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts1-2/[TS_PATH-1]' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]' exists
P00 DETAIL: update mode for '[TEST_PATH]/db-master/db/base-2' to 0777
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/1'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/16384'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/32768'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/global'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_clog'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_dynshmem'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_log'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_notify'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_replslot'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_serial'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_snapshots'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_stat'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_stat_tmp'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_subtrans'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_tblspc'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1' to '[TEST_PATH]/db-master/db/tablespace/ts1-2'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2' to '[TEST_PATH]/db-master/db/tablespace/ts2-2'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768'
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33001 (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/44000_init (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33000.32767 (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -1855,10 +1993,33 @@ P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/PG_VERSION (3B, 99%) ch
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/zerosize.txt (0B, 99%)
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/zero_from_start (0B, 99%)
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/special-!_.*'()&!@;:+,? (0B, 99%)
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 99%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt (7B, 99%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P00 INFO: write [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base-2/recovery.conf
@@ -1870,16 +2031,17 @@ restore delta, backup '[BACKUP-DIFF-2]', remap - ensure file in tblspc root rema
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --no-compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2 --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --set=[BACKUP-DIFF-2] --stanza=db --tablespace-map=1=[TEST_PATH]/db-master/db/tablespace/ts1-2 --tablespace-map=2=[TEST_PATH]/db-master/db/tablespace/ts2-2
P00 INFO: restore backup set [BACKUP-DIFF-2]
P00 INFO: remap $PGDATA directory to [TEST_PATH]/db-master/db/base-2
P00 INFO: remap tablespace pg_tblspc/1 directory to [TEST_PATH]/db-master/db/tablespace/ts1-2
P00 INFO: remap tablespace pg_tblspc/2 directory to [TEST_PATH]/db-master/db/tablespace/ts2-2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts1-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts2-2 exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/tablespace/ts1-2/[TS_PATH-1]
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base-2
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 INFO: remap data directory to '[TEST_PATH]/db-master/db/base-2'
P00 INFO: map tablespace 'pg_tblspc/1' to '[TEST_PATH]/db-master/db/tablespace/ts1-2'
P00 INFO: map tablespace 'pg_tblspc/2' to '[TEST_PATH]/db-master/db/tablespace/ts2-2'
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts1-2/[TS_PATH-1]' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base-2/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/tablespace/ts1-2/[TS_PATH-1]'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]'
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33001 - exists and matches backup (64KB, 33%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/base/32768/44000_init - exists and matches backup (32KB, 49%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33000.32767 - exists and matches backup (32KB, 66%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -1899,10 +2061,33 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/PG_VERSION - exists and
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/zerosize.txt - exists and is zero size (0B, 99%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/zero_from_start - exists and is zero size (0B, 99%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/special-!_.*'()&!@;:+,? - exists and is zero size (0B, 99%)
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt - exists and matches backup (7B, 99%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt - exists and matches backup (7B, 100%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384/tablespace1.txt - exists and matches backup (7B, 99%) checksum d85de07d6421d90aa9191c11c889bfde43680f0f
P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt - exists and matches backup (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P00 INFO: write [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/1/[TS_PATH-1]/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base-2/recovery.conf
@@ -2037,7 +2222,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -2054,7 +2239,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -2272,7 +2457,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -2289,7 +2474,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -2475,7 +2660,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -2492,7 +2677,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -2657,7 +2842,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -2674,7 +2859,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -2861,7 +3046,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -2878,7 +3063,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -3061,7 +3246,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -3078,7 +3263,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -3625,7 +3810,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -3642,7 +3827,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -3683,14 +3868,14 @@ restore delta, remap - selective restore 16384 (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --db-include=16384 --delta --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2 --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --stanza=db --tablespace-map=2=[TEST_PATH]/db-master/db/tablespace/ts2-2
P00 INFO: restore backup set [BACKUP-DIFF-5]
P00 INFO: remap tablespace pg_tblspc/2 directory to [TEST_PATH]/db-master/db/tablespace/ts2-2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts2-2 exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base-2
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: databases for include/exclude (1, 16384, 32768)
P00 DETAIL: database filter: (^pg_data\/base\/32768\/)|(^pg_tblspc/2\/[TS_PATH-1]\/32768\/)
P00 INFO: map tablespace 'pg_tblspc/2' to '[TEST_PATH]/db-master/db/tablespace/ts2-2'
P00 DETAIL: databases found for selective restore (1, 16384, 32768)
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base-2/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]'
P01 DETAIL: restore zeroed file [TEST_PATH]/db-master/db/base-2/base/32768/33001 (64KB, 36%)
P01 DETAIL: restore zeroed file [TEST_PATH]/db-master/db/base-2/base/32768/44000_init (32KB, 54%)
P01 DETAIL: restore zeroed file [TEST_PATH]/db-master/db/base-2/base/32768/33000.32767 (32KB, 72%)
@@ -3714,7 +3899,27 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/special-!_.*'()&!@;:+,?
P01 DETAIL: restore zeroed file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2c.txt (12B, 99%)
P01 DETAIL: restore zeroed file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 100%)
P00 INFO: write [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base-2/recovery.conf
@@ -3726,14 +3931,14 @@ restore delta, remap - selective restore 32768 (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --db-include=32768 --delta --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2 --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --stanza=db --tablespace-map=2=[TEST_PATH]/db-master/db/tablespace/ts2-2
P00 INFO: restore backup set [BACKUP-DIFF-5]
P00 INFO: remap tablespace pg_tblspc/2 directory to [TEST_PATH]/db-master/db/tablespace/ts2-2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2 exists
P00 DETAIL: check [TEST_PATH]/db-master/db/tablespace/ts2-2 exists
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]
P00 INFO: remove invalid files/paths/links from [TEST_PATH]/db-master/db/base-2
P00 DETAIL: preserve file [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: databases for include/exclude (1, 16384, 32768)
P00 DETAIL: database filter: (^pg_data\/base\/16384\/)|(^pg_tblspc/2\/[TS_PATH-1]\/16384\/)
P00 INFO: map tablespace 'pg_tblspc/2' to '[TEST_PATH]/db-master/db/tablespace/ts2-2'
P00 DETAIL: databases found for selective restore (1, 16384, 32768)
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]' exists
P00 DETAIL: remove 'global/pg_control' so cluster will not start if restore does not complete
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: remove invalid file '[TEST_PATH]/db-master/db/base-2/recovery.conf'
P00 INFO: remove invalid files/links/paths from '[TEST_PATH]/db-master/db/tablespace/ts2-2/[TS_PATH-1]'
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33001 (64KB, 36%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/44000_init (32KB, 54%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/32768/33000.32767 (32KB, 72%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -3757,7 +3962,27 @@ P01 DETAIL: restore file [TEST_PATH]/db-master/db/base-2/special-!_.*'()&!@;:+,?
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2c.txt (12B, 99%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P00 INFO: write [TEST_PATH]/db-master/db/base-2/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/pg_tblspc/2/[TS_PATH-1]/32768'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base-2/recovery.conf
@@ -3774,27 +3999,34 @@ restore delta, remap, expect exit 81 - error on system id (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [081]: system databases (template0, postgres, etc.) are included by default
restore, remap, expect exit 73 - no tablespace remap - error when tablespace dir does not exist (db-master host)
restore, remap - no tablespace remap (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --tablespace-map-all=../../tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --stanza=db --tablespace-map-all=../../tablespace
P00 INFO: restore backup set [BACKUP-DIFF-5]
P00 INFO: remap $PGDATA directory to [TEST_PATH]/db-master/db/base-2/base
P00 INFO: remap tablespace pg_tblspc/2 directory to ../../tablespace/ts2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2/tablespace exists
P00 ERROR: [073]: cannot restore to missing path [TEST_PATH]/db-master/db/base-2/tablespace
P00 INFO: restore command end: aborted with exception [073]
restore - no tablespace remap (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --tablespace-map-all=../../tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: restore command begin [BACKREST-VERSION]: --compress --compress-level=3 --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/log --log-subprocess --no-log-timestamp --pg1-path=[TEST_PATH]/db-master/db/base-2/base --protocol-timeout=60 --repo1-path=[TEST_PATH]/db-master/repo --stanza=db --tablespace-map-all=../../tablespace
P00 INFO: restore backup set [BACKUP-DIFF-5]
P00 INFO: remap $PGDATA directory to [TEST_PATH]/db-master/db/base-2/base
P00 INFO: remap tablespace pg_tblspc/2 directory to ../../tablespace/ts2
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2/base exists
P00 DETAIL: check [TEST_PATH]/db-master/db/base-2/tablespace exists
P00 INFO: remap data directory to '[TEST_PATH]/db-master/db/base-2/base'
P00 INFO: map tablespace 'pg_tblspc/2' to '../../tablespace/ts2'
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2/base' exists
P00 DETAIL: check '[TEST_PATH]/db-master/db/base-2/tablespace/ts2/[TS_PATH-1]' exists
P00 DETAIL: update mode for '[TEST_PATH]/db-master/db/base-2/base' to 0777
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/base'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/base/1'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/base/16384'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/base/32768'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/global'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_clog'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_dynshmem'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_log'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_notify'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_replslot'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_serial'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_snapshots'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_stat'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_stat_tmp'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_subtrans'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc'
P00 DETAIL: create symlink '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2' to '../../tablespace/ts2'
P00 DETAIL: create path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2/[TS_PATH-1]/32768'
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/base/32768/33001 (64KB, 36%) checksum 6bf316f11d28c28914ea9be92c00de9bea6d9a6b
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/base/32768/44000_init (32KB, 54%) checksum 7a16d165e4775f7c92e8cdf60c0af57313f0bf90
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/base/32768/33000.32767 (32KB, 72%) checksum 6e99b589e550e68e934fd235ccba59fe5b592a9e
@@ -3818,7 +4050,27 @@ P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/special-!_.*'()&!@
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2c.txt (12B, 99%) checksum dfcb8679956b734706cf87259d50c88f83e80e66
P01 INFO: restore file [TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2/[TS_PATH-1]/32768/tablespace2.txt (7B, 100%) checksum dc7f76e43c46101b47acc55ae4d593a9e6983578
P00 INFO: write [TEST_PATH]/db-master/db/base-2/base/recovery.conf
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/base'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/base/1'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/base/16384'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/base/32768'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_clog'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_dynshmem'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_log'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_notify'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_replslot'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_serial'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_snapshots'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_stat'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_stat_tmp'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_subtrans'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2/[TS_PATH-1]'
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/pg_tblspc/2/[TS_PATH-1]/32768'
P00 INFO: restore global/pg_control (performed last to ensure aborted restores cannot be started)
P00 DETAIL: sync path '[TEST_PATH]/db-master/db/base-2/base/global'
P00 INFO: restore command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/db/base-2/base/recovery.conf
@@ -4122,7 +4374,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -4139,7 +4391,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}
@@ -4300,7 +4552,7 @@ group="[GROUP-1]"
user="[USER-1]"
[target:path]
pg_data={}
pg_data={"mode":"0777"}
pg_data/base={}
pg_data/base/1={}
pg_data/base/16384={}
@@ -4317,7 +4569,7 @@ pg_data/pg_stat={}
pg_data/pg_stat_tmp={}
pg_data/pg_subtrans={}
pg_data/pg_tblspc={}
pg_tblspc={}
pg_tblspc={"mode":"0777"}
pg_tblspc/2={}
pg_tblspc/2/[TS_PATH-1]={}
pg_tblspc/2/[TS_PATH-1]/32768={}

View File

@@ -487,19 +487,20 @@ restore delta, force, backup '[BACKUP-FULL-2]', expect exit 40 - fail on missing
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --force --set=[BACKUP-FULL-2] --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 WARN: --delta or --force specified but unable to find 'PG_VERSION' or 'backup.manifest' in '[TEST_PATH]/db-master/db/base' to confirm that this is a valid $PGDATA directory. --delta and --force have been disabled and if any files exist in the destination directories the restore will be aborted.
P00 WARN: file link pg_hba.conf will be restored as a file at the same location
P00 WARN: contents of directory link pg_stat will be restored in a directory at the same location
P00 WARN: file link postgresql.conf will be restored as a file at the same location
P00 ERROR: [040]: cannot restore to path '[TEST_PATH]/db-master/db/base' that contains files - try using --delta if this is what you intended
P00 WARN: file link 'pg_hba.conf' will be restored as a file at the same location
P00 WARN: contents of directory link 'pg_stat' will be restored in a directory at the same location
P00 WARN: file link 'postgresql.conf' will be restored as a file at the same location
P00 ERROR: [040]: unable to restore to path '[TEST_PATH]/db-master/db/base' because it contains files
HINT: try using --delta if this is what you intended.
restore delta, force, backup '[BACKUP-FULL-2]' - restore succeeds with backup.manifest file (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --delta --force --set=[BACKUP-FULL-2] --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 WARN: group bogus in manifest cannot be used for restore, set to [USER-2]
P00 WARN: user bogus in manifest cannot be used for restore, set to [USER-2]
P00 WARN: file link pg_hba.conf will be restored as a file at the same location
P00 WARN: contents of directory link pg_stat will be restored in a directory at the same location
P00 WARN: file link postgresql.conf will be restored as a file at the same location
P00 WARN: file link 'pg_hba.conf' will be restored as a file at the same location
P00 WARN: contents of directory link 'pg_stat' will be restored in a directory at the same location
P00 WARN: file link 'postgresql.conf' will be restored as a file at the same location
P00 WARN: unknown user 'bogus' in backup manifest mapped to current user
P00 WARN: unknown group 'bogus' in backup manifest mapped to current group
+ supplemental file: [TEST_PATH]/db-master/db/base/recovery.conf
----------------------------------------------------------------
@@ -1405,7 +1406,8 @@ backrest-checksum="[CHECKSUM]"
restore, backup '[BACKUP-DIFF-2]', expect exit 40 - fail on used path (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --set=[BACKUP-DIFF-2] --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [040]: cannot restore to path '[TEST_PATH]/db-master/db/base' that contains files - try using --delta if this is what you intended
P00 ERROR: [040]: unable to restore to path '[TEST_PATH]/db-master/db/base' because it contains files
HINT: try using --delta if this is what you intended.
restore, backup '[BACKUP-DIFF-2]', remap - remap all paths (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --set=[BACKUP-DIFF-2] --stanza=db restore
@@ -3271,12 +3273,7 @@ restore delta, remap, expect exit 81 - error on system id (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [081]: system databases (template0, postgres, etc.) are included by default
restore, remap, expect exit 73 - no tablespace remap - error when tablespace dir does not exist (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --tablespace-map-all=../../tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [073]: cannot restore to missing path [TEST_PATH]/db-master/db/base-2/tablespace
restore - no tablespace remap (db-master host)
restore, remap - no tablespace remap (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --tablespace-map-all=../../tablespace --stanza=db restore
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -384,6 +384,7 @@ sub regExpReplaceAll
$strLine = $self->regExpReplace($strLine, 'HTTP-STATISTICS', 'http statistics\:.*$', '[^\:]+$', false);
$strLine = $self->regExpReplace($strLine, 'GROUP', 'strGroup = [^ \n,\[\]]+', '[^ \n,\[\]]+$');
$strLine = $self->regExpReplace($strLine, 'GROUP', 'unknown group in backup manifest mapped to \'[^\']+', '[^\']+$');
$strLine = $self->regExpReplace($strLine, 'GROUP', 'group"[ ]{0,1}:[ ]{0,1}"[^"]+', '[^"]+$');
$strLine = $self->regExpReplace($strLine, 'GROUP', 'group=\"[^"]+', '[^"]+$');
$strLine = $self->regExpReplace($strLine, 'GROUP', 'group for .* was not mapped to a name\, set to .+$', '[^ ]+$');
@@ -391,6 +392,7 @@ sub regExpReplaceAll
$strLine = $self->regExpReplace($strLine, 'GROUP', TEST_USER . '\, ' . TEST_GROUP, '[^ ]+$');
$strLine = $self->regExpReplace($strLine, 'USER', 'strRemoteHostUser = [^ \n,\[\]]+', '[^ \n,\[\]]+$');
$strLine = $self->regExpReplace($strLine, 'USER', 'unknown user in backup manifest mapped to \'[^\']+', '[^\']+$');
$strLine = $self->regExpReplace($strLine, 'USER', 'strUser = [^ \n,\[\]]+', '[^ \n,\[\]]+$');
$strLine = $self->regExpReplace($strLine, 'USER', 'user"[ ]{0,1}:[ ]{0,1}"[^"]+', '[^"]+$');
$strLine = $self->regExpReplace($strLine, 'USER', 'user=\"[^"]+', '[^"]+$');

View File

@@ -600,6 +600,9 @@ sub run
# Restore will set invalid user and group to root since the base path user/group are also invalid
if (!$bRemote)
{
$oManifest{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_TARGET_PGDATA}{&MANIFEST_SUBKEY_USER} = 'root';
$oManifest{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_TARGET_PGDATA}{&MANIFEST_SUBKEY_GROUP} = 'root';
$oManifest{&MANIFEST_SECTION_TARGET_FILE}{MANIFEST_TARGET_PGDATA . '/base/1/' . DB_FILE_PGVERSION}
{&MANIFEST_SUBKEY_USER} = 'root';
$oManifest{&MANIFEST_SECTION_TARGET_FILE}{MANIFEST_TARGET_PGDATA . '/base/16384/' . DB_FILE_PGVERSION}
@@ -699,7 +702,7 @@ sub run
$oHostDbMaster->restore(
'error on existing linked file', $strFullBackup,
{rhExpectedManifest => \%oManifest, iExpectedExitStatus => ERROR_PATH_NOT_EMPTY,
{rhExpectedManifest => \%oManifest, iExpectedExitStatus => ERROR_FILE_EXISTS,
strOptionalParam => '--log-level-console=warn --link-all'});
executeTest('rm ' . $oHostDbMaster->dbPath() . '/pg_config/pg_hba.conf');
@@ -725,6 +728,8 @@ sub run
# testFileCreate(
# $oHostDbMaster->dbPath() . '/pg_config/pg_hba.conf', "CONTENTS2\n", $lTime - 100);
$oHostDbMaster->dbFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'backup.manifest', '');
$oHostDbMaster->restore(
'restore all links --link-all and mapping', $strFullBackup,
{rhExpectedManifest => \%oManifest, bDelta => true,
@@ -1074,10 +1079,11 @@ sub run
$oRemapHash{&MANIFEST_TARGET_PGTBLSPC . '/1'} = $oHostDbMaster->tablespacePath(1, 2);
$oRemapHash{&MANIFEST_TARGET_PGTBLSPC . '/2'} = $oHostDbMaster->tablespacePath(2, 2);
# At this point the $PG_DATA permissions have been reset to 0600
# At this point the $PG_DATA permissions have been reset to 0700
if (!$bRemote)
{
delete($oManifest{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_TARGET_PGDATA}{&MANIFEST_SUBKEY_MODE});
$oManifest{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_TARGET_PGDATA}{&MANIFEST_SUBKEY_MODE} = '0777';
$oManifest{&MANIFEST_SECTION_TARGET_PATH}{&MANIFEST_TARGET_PGTBLSPC}{&MANIFEST_SUBKEY_MODE} = '0777';
}
$oHostDbMaster->restore(
@@ -1340,16 +1346,9 @@ sub run
$oRemapHash{&MANIFEST_TARGET_PGDATA} = $strDbPath;
delete($oRemapHash{&MANIFEST_TARGET_PGTBLSPC . '/2'});
$oHostDbMaster->restore(
'no tablespace remap - error when tablespace dir does not exist', cfgDefOptionDefault(CFGCMD_RESTORE, CFGOPT_SET),
{rhExpectedManifest => \%oManifest, rhRemapHash => \%oRemapHash, iExpectedExitStatus => ERROR_PATH_MISSING,
bTablespace => false, strOptionalParam => '--tablespace-map-all=../../tablespace'});
storageTest()->pathCreate($oHostDbMaster->dbBasePath(2) . '/tablespace', {strMode => '0700'});
$oHostDbMaster->restore(
'no tablespace remap', cfgDefOptionDefault(CFGCMD_RESTORE, CFGOPT_SET),
{rhExpectedManifest => \%oManifest, bTablespace => false,
{rhExpectedManifest => \%oManifest, rhRemapHash => \%oRemapHash, bTablespace => false,
strOptionalParam => '--tablespace-map-all=../../tablespace'});
$oManifest{&MANIFEST_SECTION_BACKUP_TARGET}{'pg_tblspc/2'}{&MANIFEST_SUBKEY_PATH} = '../../tablespace/ts2';

File diff suppressed because it is too large Load Diff