mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Refactor database version identification for archive and backup commands.
Added database version constants and changed version identification code to use hash tables instead of if-else. Propagated the db version constants to the rest of the code and in passing fixed some path/filename constants. Added new regression tests to check that specific files are never copied.
This commit is contained in:
parent
4d9920cc48
commit
512d006346
@ -20,6 +20,7 @@ use pgBackRest::ArchiveInfo;
|
||||
use pgBackRest::Common::String;
|
||||
use pgBackRest::Common::Wait;
|
||||
use pgBackRest::Config::Config;
|
||||
use pgBackRest::Db;
|
||||
use pgBackRest::File;
|
||||
use pgBackRest::FileCommon;
|
||||
|
||||
@ -43,6 +44,27 @@ use constant OP_ARCHIVE_WAL_FILE_NAME => OP_ARCHIV
|
||||
use constant OP_ARCHIVE_WAL_INFO => OP_ARCHIVE . '->walInfo';
|
||||
use constant OP_ARCHIVE_XFER => OP_ARCHIVE . '->xfer';
|
||||
|
||||
####################################################################################################################################
|
||||
# PostgreSQL WAL magic
|
||||
####################################################################################################################################
|
||||
my $oWalMagicHash =
|
||||
{
|
||||
hex('0xD062') => PG_VERSION_83,
|
||||
hex('0xD063') => PG_VERSION_84,
|
||||
hex('0xD064') => PG_VERSION_90,
|
||||
hex('0xD066') => PG_VERSION_91,
|
||||
hex('0xD071') => PG_VERSION_92,
|
||||
hex('0xD075') => PG_VERSION_93,
|
||||
hex('0xD07E') => PG_VERSION_94,
|
||||
hex('0xD087') => PG_VERSION_95,
|
||||
};
|
||||
|
||||
####################################################################################################################################
|
||||
# PostgreSQL WAL system id offset
|
||||
####################################################################################################################################
|
||||
use constant PG_WAL_SYSTEM_ID_OFFSET_GTE_93 => 20;
|
||||
use constant PG_WAL_SYSTEM_ID_OFFSET_LT_93 => 12;
|
||||
|
||||
####################################################################################################################################
|
||||
# constructor
|
||||
####################################################################################################################################
|
||||
@ -244,7 +266,8 @@ sub walInfo
|
||||
{name => 'strWalFile'}
|
||||
);
|
||||
|
||||
# Open the WAL segment
|
||||
# Open the WAL segment and read magic number
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
my $hFile;
|
||||
my $tBlock;
|
||||
|
||||
@ -257,67 +280,27 @@ sub walInfo
|
||||
|
||||
my $iMagic = unpack('S', $tBlock);
|
||||
|
||||
# Make sure the WAL magic is supported
|
||||
my $strDbVersion;
|
||||
my $iSysIdOffset;
|
||||
# Map the WAL magic number to the version of PostgreSQL.
|
||||
#
|
||||
# The magic number can be found in src/include/access/xlog_internal.h The offset can be determined by counting bytes in the
|
||||
# XLogPageHeaderData struct, though this value rarely changes.
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
my $strDbVersion = $$oWalMagicHash{$iMagic};
|
||||
|
||||
if ($iMagic == hex('0xD087'))
|
||||
if (!defined($strDbVersion))
|
||||
{
|
||||
$strDbVersion = '9.5';
|
||||
$iSysIdOffset = 20;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD07E'))
|
||||
{
|
||||
$strDbVersion = '9.4';
|
||||
$iSysIdOffset = 20;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD075'))
|
||||
{
|
||||
$strDbVersion = '9.3';
|
||||
$iSysIdOffset = 20;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD071'))
|
||||
{
|
||||
$strDbVersion = '9.2';
|
||||
$iSysIdOffset = 12;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD066'))
|
||||
{
|
||||
$strDbVersion = '9.1';
|
||||
$iSysIdOffset = 12;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD064'))
|
||||
{
|
||||
$strDbVersion = '9.0';
|
||||
$iSysIdOffset = 12;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD063'))
|
||||
{
|
||||
$strDbVersion = '8.4';
|
||||
$iSysIdOffset = 12;
|
||||
}
|
||||
elsif ($iMagic == hex('0xD062'))
|
||||
{
|
||||
$strDbVersion = '8.3';
|
||||
$iSysIdOffset = 12;
|
||||
}
|
||||
# elsif ($iMagic == hex('0xD05E'))
|
||||
# {
|
||||
# $strDbVersion = '8.2';
|
||||
# $iSysIdOffset = 12;
|
||||
# }
|
||||
# elsif ($iMagic == hex('0xD05D'))
|
||||
# {
|
||||
# $strDbVersion = '8.1';
|
||||
# $iSysIdOffset = 12;
|
||||
# }
|
||||
else
|
||||
{
|
||||
confess &log(ERROR, "unexpected xlog magic 0x" . sprintf("%X", $iMagic) . ' (unsupported PostgreSQL version?)',
|
||||
confess &log(ERROR, "unexpected WAL magic 0x" . sprintf("%X", $iMagic) . "\n" .
|
||||
'HINT: Is this version of PostgreSQL supported?',
|
||||
ERROR_VERSION_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
# Read flags
|
||||
# Map the WAL PostgreSQL version to the system identifier offset. The offset can be determined by counting bytes in the
|
||||
# XLogPageHeaderData struct, though this value rarely changes.
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
my $iSysIdOffset = $strDbVersion >= PG_VERSION_93 ? PG_WAL_SYSTEM_ID_OFFSET_GTE_93 : PG_WAL_SYSTEM_ID_OFFSET_LT_93;
|
||||
|
||||
# Check flags to be sure the long header is present (this is an extra check to be sure the system id exists)
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
sysread($hFile, $tBlock, 2) == 2
|
||||
or confess &log(ERROR, "unable to read xlog info");
|
||||
|
||||
@ -327,7 +310,8 @@ sub walInfo
|
||||
$iFlag & 2
|
||||
or confess &log(ERROR, "expected long header in flags " . sprintf("%x", $iFlag));
|
||||
|
||||
# Get the database system id
|
||||
# Get the system id
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
sysseek($hFile, $iSysIdOffset, SEEK_CUR)
|
||||
or confess &log(ERROR, "unable to read padding");
|
||||
|
||||
|
@ -380,7 +380,7 @@ sub processManifest
|
||||
# pg_control should always be in the backup (unless this is an offline backup)
|
||||
if (!defined($oFileCopyMap{&MANIFEST_TARGET_PGDATA}{&MANIFEST_FILE_PGCONTROL}) && optionGet(OPTION_ONLINE))
|
||||
{
|
||||
confess &log(ERROR, "global/pg_control must be present in all online backups\n" .
|
||||
confess &log(ERROR, DB_FILE_PGCONTROL . " must be present in all online backups\n" .
|
||||
'HINT: Is something wrong with the clock or filesystem timestamps?', ERROR_FILE_MISSING);
|
||||
}
|
||||
|
||||
@ -626,13 +626,13 @@ sub process
|
||||
!optionGet(OPTION_ONLINE) || optionGet(OPTION_BACKUP_ARCHIVE_CHECK));
|
||||
|
||||
# Database info
|
||||
my ($fDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId) =
|
||||
my ($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId) =
|
||||
$self->{oDb}->info($self->{oFile}, optionGet(OPTION_DB_PATH));
|
||||
|
||||
my $iDbHistoryId = $oBackupInfo->check($fDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId);
|
||||
my $iDbHistoryId = $oBackupInfo->check($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId);
|
||||
|
||||
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_ID, undef, $iDbHistoryId);
|
||||
$oBackupManifest->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $fDbVersion);
|
||||
$oBackupManifest->set(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION, undef, $strDbVersion);
|
||||
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CONTROL, undef, $iControlVersion);
|
||||
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CATALOG, undef, $iCatalogVersion);
|
||||
$oBackupManifest->numericSet(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_SYSTEM_ID, undef, $ullDbSysId);
|
||||
@ -645,17 +645,17 @@ sub process
|
||||
# Don't start the backup but do check if PostgreSQL is running
|
||||
if (!optionGet(OPTION_ONLINE))
|
||||
{
|
||||
if ($self->{oFile}->exists(PATH_DB_ABSOLUTE, optionGet(OPTION_DB_PATH) . '/' . FILE_POSTMASTER_PID))
|
||||
if ($self->{oFile}->exists(PATH_DB_ABSOLUTE, optionGet(OPTION_DB_PATH) . '/' . DB_FILE_POSTMASTERPID))
|
||||
{
|
||||
if (optionGet(OPTION_FORCE))
|
||||
{
|
||||
&log(WARN, '--no-online passed and ' . FILE_POSTMASTER_PID . ' exists but --force was passed so backup will ' .
|
||||
&log(WARN, '--no-online passed and ' . DB_FILE_POSTMASTERPID . ' exists but --force was passed so backup will ' .
|
||||
'continue though it looks like the postmaster is running and the backup will probably not be ' .
|
||||
'consistent');
|
||||
}
|
||||
else
|
||||
{
|
||||
confess &log(ERROR, '--no-online passed but ' . FILE_POSTMASTER_PID . ' exists - looks like the postmaster is ' .
|
||||
confess &log(ERROR, '--no-online passed but ' . DB_FILE_POSTMASTERPID . ' exists - looks like the postmaster is ' .
|
||||
'running. Shutdown the postmaster and try again, or use --force.', ERROR_POSTMASTER_RUNNING);
|
||||
}
|
||||
}
|
||||
@ -663,11 +663,9 @@ sub process
|
||||
# Else start the backup normally
|
||||
else
|
||||
{
|
||||
my $strTimestampDbStart;
|
||||
|
||||
# Start the backup
|
||||
($strArchiveStart, $strTimestampDbStart) =
|
||||
$self->{oDb}->backupStart($self->{oFile}, optionGet(OPTION_DB_PATH), BACKREST_NAME . ' Backup Started at ' .
|
||||
($strArchiveStart) =
|
||||
$self->{oDb}->backupStart($self->{oFile}, optionGet(OPTION_DB_PATH), BACKREST_NAME . ' backup started at ' .
|
||||
timestampFormat(undef, $lTimestampStart), optionGet(OPTION_START_FAST));
|
||||
|
||||
# Record the archive start location
|
||||
@ -693,7 +691,7 @@ sub process
|
||||
my $strReason = "resume is disabled";
|
||||
my $oAbortedManifest;
|
||||
|
||||
# Attempt to read the manifest file in the aborted backup to seeif it can be used. If any error at all occurs then the
|
||||
# Attempt to read the manifest file in the aborted backup to see if it can be used. If any error at all occurs then the
|
||||
# backup will be considered unusable and a resume will not be attempted.
|
||||
if (optionGet(OPTION_RESUME))
|
||||
{
|
||||
@ -810,8 +808,7 @@ sub process
|
||||
|
||||
if (optionGet(OPTION_ONLINE))
|
||||
{
|
||||
my $strTimestampDbStop;
|
||||
($strArchiveStop, $strTimestampDbStop) = $self->{oDb}->backupStop();
|
||||
($strArchiveStop) = $self->{oDb}->backupStop();
|
||||
|
||||
$oBackupManifest->set(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_ARCHIVE_STOP, undef, $strArchiveStop);
|
||||
|
||||
@ -833,7 +830,7 @@ sub process
|
||||
logDebugMisc($strOperation, "retrieve archive logs ${strArchiveStart}:${strArchiveStop}");
|
||||
my $oArchive = new pgBackRest::Archive();
|
||||
my $strArchiveId = $oArchive->getCheck($self->{oFile});
|
||||
my @stryArchive = $oArchive->range($strArchiveStart, $strArchiveStop, $fDbVersion < 9.3);
|
||||
my @stryArchive = $oArchive->range($strArchiveStart, $strArchiveStop, $strDbVersion < PG_VERSION_93);
|
||||
|
||||
foreach my $strArchive (@stryArchive)
|
||||
{
|
||||
|
@ -43,21 +43,58 @@ use constant OP_DB_TABLESPACE_MAP_GET => OP_DB . "
|
||||
use constant OP_DB_VERSION_GET => OP_DB . "->versionGet";
|
||||
use constant OP_DB_VERSION_SUPPORT => OP_DB . "->versionSupport";
|
||||
|
||||
####################################################################################################################################
|
||||
# Postgres filename constants
|
||||
####################################################################################################################################
|
||||
use constant FILE_POSTMASTER_PID => 'postmaster.pid';
|
||||
push @EXPORT, qw(FILE_POSTMASTER_PID);
|
||||
|
||||
use constant FILE_PG_VERSION => 'PG_VERSION';
|
||||
push @EXPORT, qw(FILE_PG_VERSION);
|
||||
|
||||
####################################################################################################################################
|
||||
# Backup advisory lock
|
||||
####################################################################################################################################
|
||||
use constant DB_BACKUP_ADVISORY_LOCK => '12340078987004321';
|
||||
push @EXPORT, qw(DB_BACKUP_ADVISORY_LOCK);
|
||||
|
||||
####################################################################################################################################
|
||||
# PostgreSQL version numbers
|
||||
####################################################################################################################################
|
||||
use constant PG_VERSION_83 => '8.3';
|
||||
push @EXPORT, qw(PG_VERSION_83);
|
||||
use constant PG_VERSION_84 => '8.4';
|
||||
push @EXPORT, qw(PG_VERSION_84);
|
||||
use constant PG_VERSION_90 => '9.0';
|
||||
push @EXPORT, qw(PG_VERSION_90);
|
||||
use constant PG_VERSION_91 => '9.1';
|
||||
push @EXPORT, qw(PG_VERSION_91);
|
||||
use constant PG_VERSION_92 => '9.2';
|
||||
push @EXPORT, qw(PG_VERSION_92);
|
||||
use constant PG_VERSION_93 => '9.3';
|
||||
push @EXPORT, qw(PG_VERSION_93);
|
||||
use constant PG_VERSION_94 => '9.4';
|
||||
push @EXPORT, qw(PG_VERSION_94);
|
||||
use constant PG_VERSION_95 => '9.5';
|
||||
push @EXPORT, qw(PG_VERSION_95);
|
||||
|
||||
####################################################################################################################################
|
||||
# Map the control and catalog versions to PostgreSQL version.
|
||||
#
|
||||
# The control version can be found in src/include/catalog/pg_control.h and may not change with every version of PostgreSQL but is
|
||||
# still checked to detect custom builds which change the structure. The catalog version can be found in
|
||||
# src/include/catalog/catversion.h and should change with every release.
|
||||
####################################################################################################################################
|
||||
my $oPgControlVersionHash =
|
||||
{
|
||||
# iControlVersion => {iCatalogVersion => strDbVersion}
|
||||
833 => {200711281 => PG_VERSION_83},
|
||||
843 => {200904091 => PG_VERSION_84},
|
||||
903 =>
|
||||
{
|
||||
201008051 => PG_VERSION_90,
|
||||
201105231 => PG_VERSION_91,
|
||||
},
|
||||
922 => {201204301 => PG_VERSION_92},
|
||||
937 => {201306121 => PG_VERSION_93},
|
||||
942 =>
|
||||
{
|
||||
201409291 => PG_VERSION_94,
|
||||
201510051 => PG_VERSION_95,
|
||||
},
|
||||
};
|
||||
|
||||
####################################################################################################################################
|
||||
# CONSTRUCTOR
|
||||
####################################################################################################################################
|
||||
@ -133,7 +170,8 @@ sub versionSupport
|
||||
OP_DB_VERSION_SUPPORT
|
||||
);
|
||||
|
||||
my @strySupportVersion = ('8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5');
|
||||
my @strySupportVersion = (PG_VERSION_83, PG_VERSION_84, PG_VERSION_90, PG_VERSION_91, PG_VERSION_92, PG_VERSION_93,
|
||||
PG_VERSION_94, PG_VERSION_95);
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn
|
||||
@ -428,140 +466,92 @@ sub info
|
||||
{name => 'strDbPath'}
|
||||
);
|
||||
|
||||
# Return data from the cache if it exists
|
||||
if (defined($self->{info}{$strDbPath}))
|
||||
# Get info if it is not cached
|
||||
#-------------------------------------------------------------------------------------------------------------------------------
|
||||
if (!defined($self->{info}{$strDbPath}))
|
||||
{
|
||||
return $self->{info}{$strDbPath}{fDbVersion},
|
||||
$self->{info}{$strDbPath}{iControlVersion},
|
||||
$self->{info}{$strDbPath}{iCatalogVersion},
|
||||
$self->{info}{$strDbPath}{ullDbSysId};
|
||||
}
|
||||
|
||||
# Database info
|
||||
my $iCatalogVersion;
|
||||
my $iControlVersion;
|
||||
my $ullDbSysId;
|
||||
my $fDbVersion;
|
||||
|
||||
if ($oFile->isRemote(PATH_DB_ABSOLUTE))
|
||||
{
|
||||
# Build param hash
|
||||
my %oParamHash;
|
||||
|
||||
$oParamHash{'db-path'} = ${strDbPath};
|
||||
|
||||
# Output remote trace info
|
||||
&log(TRACE, OP_DB_INFO . ": remote (" . $oFile->{oProtocol}->commandParamString(\%oParamHash) . ')');
|
||||
|
||||
# Execute the command
|
||||
my $strResult = $oFile->{oProtocol}->cmdExecute(OP_DB_INFO, \%oParamHash, true);
|
||||
|
||||
# Split the result into return values
|
||||
my @stryToken = split(/\t/, $strResult);
|
||||
|
||||
$fDbVersion = $stryToken[0];
|
||||
$iControlVersion = $stryToken[1];
|
||||
$iCatalogVersion = $stryToken[2];
|
||||
$ullDbSysId = $stryToken[3];
|
||||
}
|
||||
else
|
||||
{
|
||||
# Open the control file
|
||||
my $strControlFile = "${strDbPath}/global/pg_control";
|
||||
my $hFile;
|
||||
my $tBlock;
|
||||
|
||||
sysopen($hFile, $strControlFile, O_RDONLY)
|
||||
or confess &log(ERROR, "unable to open ${strControlFile}", ERROR_FILE_OPEN);
|
||||
|
||||
# Read system identifier
|
||||
sysread($hFile, $tBlock, 8) == 8
|
||||
or confess &log(ERROR, "unable to read database system identifier");
|
||||
|
||||
$ullDbSysId = unpack('Q', $tBlock);
|
||||
|
||||
# Read control version
|
||||
sysread($hFile, $tBlock, 4) == 4
|
||||
or confess &log(ERROR, "unable to read control version");
|
||||
|
||||
$iControlVersion = unpack('L', $tBlock);
|
||||
|
||||
# Read catalog version
|
||||
sysread($hFile, $tBlock, 4) == 4
|
||||
or confess &log(ERROR, "unable to read catalog version");
|
||||
|
||||
$iCatalogVersion = unpack('L', $tBlock);
|
||||
|
||||
# Close the control file
|
||||
close($hFile);
|
||||
|
||||
# Make sure the control version is supported
|
||||
if ($iControlVersion == 942 && $iCatalogVersion == 201510051)
|
||||
# Get info from remote
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
if ($oFile->isRemote(PATH_DB_ABSOLUTE))
|
||||
{
|
||||
$fDbVersion = '9.5';
|
||||
}
|
||||
elsif ($iControlVersion == 942 && $iCatalogVersion == 201409291)
|
||||
{
|
||||
$fDbVersion = '9.4';
|
||||
}
|
||||
elsif ($iControlVersion == 937 && $iCatalogVersion == 201306121)
|
||||
{
|
||||
$fDbVersion = '9.3';
|
||||
}
|
||||
elsif ($iControlVersion == 922 && $iCatalogVersion == 201204301)
|
||||
{
|
||||
$fDbVersion = '9.2';
|
||||
}
|
||||
elsif ($iControlVersion == 903 && $iCatalogVersion == 201105231)
|
||||
{
|
||||
$fDbVersion = '9.1';
|
||||
}
|
||||
elsif ($iControlVersion == 903 && $iCatalogVersion == 201008051)
|
||||
{
|
||||
$fDbVersion = '9.0';
|
||||
}
|
||||
elsif ($iControlVersion == 843 && $iCatalogVersion == 200904091)
|
||||
{
|
||||
$fDbVersion = '8.4';
|
||||
}
|
||||
elsif ($iControlVersion == 833 && $iCatalogVersion == 200711281)
|
||||
{
|
||||
$fDbVersion = '8.3';
|
||||
}
|
||||
elsif ($iControlVersion == 822 && $iCatalogVersion == 200611241)
|
||||
{
|
||||
$fDbVersion = '8.2';
|
||||
}
|
||||
elsif ($iControlVersion == 812 && $iCatalogVersion == 200510211)
|
||||
{
|
||||
$fDbVersion = '8.1';
|
||||
}
|
||||
elsif ($iControlVersion == 74 && $iCatalogVersion == 200411041)
|
||||
{
|
||||
$fDbVersion = '8.0';
|
||||
# Build param hash
|
||||
my %oParamHash;
|
||||
|
||||
$oParamHash{'db-path'} = ${strDbPath};
|
||||
|
||||
# Output remote trace info
|
||||
&log(TRACE, OP_DB_INFO . ": remote (" . $oFile->{oProtocol}->commandParamString(\%oParamHash) . ')');
|
||||
|
||||
# Execute the command
|
||||
my $strResult = $oFile->{oProtocol}->cmdExecute(OP_DB_INFO, \%oParamHash, true);
|
||||
|
||||
# Split the result into return values
|
||||
my @stryToken = split(/\t/, $strResult);
|
||||
|
||||
# Cache info so it does not need to read again for the same database
|
||||
$self->{info}{$strDbPath}{strDbVersion} = $stryToken[0];
|
||||
$self->{info}{$strDbPath}{iControlVersion} = $stryToken[1];
|
||||
$self->{info}{$strDbPath}{iCatalogVersion} = $stryToken[2];
|
||||
$self->{info}{$strDbPath}{ullDbSysId} = $stryToken[3];
|
||||
}
|
||||
# Get info locally
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
else
|
||||
{
|
||||
confess &log(ERROR, "unexpected control version = ${iControlVersion} and catalog version = ${iCatalogVersion}" .
|
||||
' (unsupported PostgreSQL version?)',
|
||||
ERROR_VERSION_NOT_SUPPORTED);
|
||||
# Open the control file and read system id and versions
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
my $strControlFile = "${strDbPath}/" . DB_FILE_PGCONTROL;
|
||||
my $hFile;
|
||||
my $tBlock;
|
||||
|
||||
sysopen($hFile, $strControlFile, O_RDONLY)
|
||||
or confess &log(ERROR, "unable to open ${strControlFile}", ERROR_FILE_OPEN);
|
||||
|
||||
# Read system identifier
|
||||
sysread($hFile, $tBlock, 8) == 8
|
||||
or confess &log(ERROR, "unable to read database system identifier");
|
||||
|
||||
$self->{info}{$strDbPath}{ullDbSysId} = unpack('Q', $tBlock);
|
||||
|
||||
# Read control version
|
||||
sysread($hFile, $tBlock, 4) == 4
|
||||
or confess &log(ERROR, "unable to read control version");
|
||||
|
||||
$self->{info}{$strDbPath}{iControlVersion} = unpack('L', $tBlock);
|
||||
|
||||
# Read catalog version
|
||||
sysread($hFile, $tBlock, 4) == 4
|
||||
or confess &log(ERROR, "unable to read catalog version");
|
||||
|
||||
$self->{info}{$strDbPath}{iCatalogVersion} = unpack('L', $tBlock);
|
||||
|
||||
# Close the control file
|
||||
close($hFile);
|
||||
|
||||
# Get PostgreSQL version
|
||||
$self->{info}{$strDbPath}{strDbVersion} =
|
||||
$$oPgControlVersionHash{$self->{info}{$strDbPath}{iControlVersion}}{$self->{info}{$strDbPath}{iCatalogVersion}};
|
||||
|
||||
if (!defined($self->{info}{$strDbPath}{strDbVersion}))
|
||||
{
|
||||
confess &log(
|
||||
ERROR,
|
||||
'unexpected control version = ' . $self->{info}{$strDbPath}{iControlVersion} .
|
||||
' and catalog version = ' . $self->{info}{$strDbPath}{iCatalogVersion} . "\n" .
|
||||
'HINT: Is this version of PostgreSQL supported?',
|
||||
ERROR_VERSION_NOT_SUPPORTED);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Store data in the cache
|
||||
$self->{info}{$strDbPath}{fDbVersion} = $fDbVersion;
|
||||
$self->{info}{$strDbPath}{iControlVersion} = $iControlVersion;
|
||||
$self->{info}{$strDbPath}{iCatalogVersion} = $iCatalogVersion;
|
||||
$self->{info}{$strDbPath}{ullDbSysId} = $ullDbSysId;
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn
|
||||
(
|
||||
$strOperation,
|
||||
{name => 'fDbVersion', value => $fDbVersion},
|
||||
{name => 'iControlVersion', value => $iControlVersion},
|
||||
{name => 'iCatalogVersion', value => $iCatalogVersion},
|
||||
{name => 'ullDbSysId', value => $ullDbSysId}
|
||||
{name => 'strDbVersion', value => $self->{info}{$strDbPath}{strDbVersion}},
|
||||
{name => 'iControlVersion', value => $self->{info}{$strDbPath}{iControlVersion}},
|
||||
{name => 'iCatalogVersion', value => $self->{info}{$strDbPath}{iCatalogVersion}},
|
||||
{name => 'ullDbSysId', value => $self->{info}{$strDbPath}{ullDbSysId}}
|
||||
);
|
||||
}
|
||||
|
||||
@ -583,28 +573,28 @@ sub versionGet
|
||||
);
|
||||
|
||||
# Get data from the cache if possible
|
||||
if (defined($self->{fDbVersion}) && defined($self->{strDbPath}))
|
||||
if (defined($self->{strDbVersion}) && defined($self->{strDbPath}))
|
||||
{
|
||||
return $self->{fDbVersion}, $self->{strDbPath};
|
||||
return $self->{strDbVersion}, $self->{strDbPath};
|
||||
}
|
||||
|
||||
# Get version and db-path from
|
||||
($self->{fDbVersion}, $self->{strDbPath}) =
|
||||
($self->{strDbVersion}, $self->{strDbPath}) =
|
||||
$self->executeSqlRow("select (regexp_matches(split_part(version(), ' ', 2), '^[0-9]+\.[0-9]+'))[1], setting" .
|
||||
" from pg_settings where name = 'data_directory'");
|
||||
|
||||
my @stryVersionSupport = versionSupport();
|
||||
|
||||
if ($self->{fDbVersion} < $stryVersionSupport[0])
|
||||
if ($self->{strDbVersion} < $stryVersionSupport[0])
|
||||
{
|
||||
confess &log(ERROR, 'unsupported Postgres version' . $self->{fDbVersion}, ERROR_VERSION_NOT_SUPPORTED);
|
||||
confess &log(ERROR, 'unsupported Postgres version' . $self->{strDbVersion}, ERROR_VERSION_NOT_SUPPORTED);
|
||||
}
|
||||
|
||||
# Return from function and log return values if any
|
||||
return logDebugReturn
|
||||
(
|
||||
$strOperation,
|
||||
{name => 'fDbVersion', value => $self->{fDbVersion}},
|
||||
{name => 'strDbVersion', value => $self->{strDbVersion}},
|
||||
{name => 'strDbPath', value => $self->{strDbPath}}
|
||||
);
|
||||
}
|
||||
@ -635,30 +625,29 @@ sub backupStart
|
||||
);
|
||||
|
||||
# Get the version from the control file
|
||||
my ($fDbVersion) = $self->info($oFile, $strDbPath);
|
||||
my ($strDbVersion) = $self->info($oFile, $strDbPath);
|
||||
|
||||
# Get version and db path from the database
|
||||
my ($fCompareDbVersion, $strCompareDbPath) = $self->versionGet();
|
||||
|
||||
# Error if the version from the control file and the configured db-path do not match the values obtained from the database
|
||||
if (!($fDbVersion == $fCompareDbVersion && $strDbPath eq $strCompareDbPath))
|
||||
if (!($strDbVersion == $fCompareDbVersion && $strDbPath eq $strCompareDbPath))
|
||||
{
|
||||
confess &log(ERROR, "version '${fCompareDbVersion}' and db-path '${strCompareDbPath}' queried from cluster does not match" .
|
||||
" version '${fDbVersion}' and db-path '${strDbPath}' read from '${strDbPath}/global/pg_control'\n" .
|
||||
"HINT: the db-path and db-port settings likely reference different clusters", ERROR_DB_MISMATCH);
|
||||
confess &log(ERROR,
|
||||
"version '${fCompareDbVersion}' and db-path '${strCompareDbPath}' queried from cluster does not match" .
|
||||
" version '${strDbVersion}' and db-path '${strDbPath}' read from '${strDbPath}/" . DB_FILE_PGCONTROL . "'\n" .
|
||||
"HINT: the db-path and db-port settings likely reference different clusters", ERROR_DB_MISMATCH);
|
||||
}
|
||||
|
||||
# Only allow start-fast option for version >= 8.4
|
||||
if ($self->{fDbVersion} < 8.4 && $bStartFast)
|
||||
if ($self->{strDbVersion} < PG_VERSION_84 && $bStartFast)
|
||||
{
|
||||
&log(WARN, OPTION_START_FAST . ' option is only available in PostgreSQL >= 8.4');
|
||||
&log(WARN, OPTION_START_FAST . ' option is only available in PostgreSQL >= ' . PG_VERSION_84);
|
||||
$bStartFast = false;
|
||||
}
|
||||
|
||||
# Error if archive_mode = always (support has not been added yet)
|
||||
my $strArchiveMode = trim($self->executeSql('show archive_mode'));
|
||||
|
||||
if ($strArchiveMode eq 'always')
|
||||
if ($self->executeSql('show archive_mode') eq 'always')
|
||||
{
|
||||
confess &log(ERROR, "archive_mode=always not supported", ERROR_FEATURE_NOT_SUPPORTED);
|
||||
}
|
||||
@ -683,13 +672,13 @@ sub backupStart
|
||||
if (optionGet(OPTION_STOP_AUTO))
|
||||
{
|
||||
# Running backups can only be detected in PostgreSQL >= 9.3
|
||||
if ($self->{fDbVersion} >= 9.3)
|
||||
if ($self->{strDbVersion} >= PG_VERSION_93)
|
||||
{
|
||||
# If a backup is currently in progress emit a warning and then stop it
|
||||
if ($self->executeSqlOne('select pg_is_in_backup()'))
|
||||
{
|
||||
&log(WARN, 'the cluster is already in backup mode but no backup process is running. pg_stop_backup() will be called' .
|
||||
' so a new backup can be started.');
|
||||
&log(WARN, 'the cluster is already in backup mode but no backup process is running.' .
|
||||
' pg_stop_backup() will be called so a new backup can be started.');
|
||||
$self->backupStop();
|
||||
}
|
||||
}
|
||||
@ -697,7 +686,7 @@ sub backupStart
|
||||
# generated later on.
|
||||
else
|
||||
{
|
||||
&log(WARN, OPTION_STOP_AUTO . 'option is only available in PostgreSQL >= 9.3');
|
||||
&log(WARN, OPTION_STOP_AUTO . 'option is only available in PostgreSQL >= ' . PG_VERSION_93);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -156,18 +156,36 @@ use constant MANIFEST_SUBKEY_USER => 'user';
|
||||
####################################################################################################################################
|
||||
# Database locations for important files/paths
|
||||
####################################################################################################################################
|
||||
use constant DB_FILE_RECOVERY_CONF => 'recovery.conf';
|
||||
push @EXPORT, qw(DB_FILE_RECOVERY_CONF);
|
||||
use constant DB_PATH_GLOBAL => 'global';
|
||||
push @EXPORT, qw(DB_PATH_GLOBAL);
|
||||
use constant DB_PATH_PGTBLSPC => 'pg_tblspc';
|
||||
push @EXPORT, qw(DB_PATH_PGTBLSPC);
|
||||
####################################################################################################################################
|
||||
use constant DB_FILE_POSTMASTERPID => 'postmaster.pid';
|
||||
push @EXPORT, qw(DB_FILE_POSTMASTERPID);
|
||||
|
||||
use constant DB_FILE_BACKUPLABEL => 'backup_label';
|
||||
push @EXPORT, qw(DB_FILE_BACKUPLABEL);
|
||||
use constant DB_FILE_BACKUPLABELOLD => DB_FILE_BACKUPLABEL . '.old';
|
||||
push @EXPORT, qw(DB_FILE_BACKUPLABELOLD);
|
||||
use constant DB_FILE_PGCONTROL => DB_PATH_GLOBAL . '/pg_control';
|
||||
push @EXPORT, qw(DB_FILE_PGCONTROL);
|
||||
use constant DB_FILE_PGVERSION => 'PG_VERSION';
|
||||
push @EXPORT, qw(DB_FILE_PGVERSION);
|
||||
use constant DB_FILE_RECOVERYCONF => 'recovery.conf';
|
||||
push @EXPORT, qw(DB_FILE_RECOVERYCONF);
|
||||
use constant DB_FILE_RECOVERYDONE => 'recovery.done';
|
||||
push @EXPORT, qw(DB_FILE_RECOVERYDONE);
|
||||
use constant DB_FILE_TABLESPACEMAP => 'tablespace_map';
|
||||
push @EXPORT, qw(DB_FILE_TABLESPACEMAP);
|
||||
|
||||
####################################################################################################################################
|
||||
# Manifest locations for important files/paths
|
||||
####################################################################################################################################
|
||||
use constant MANIFEST_FILE_TABLESPACEMAP => MANIFEST_TARGET_PGDATA . '/tablespace_map';
|
||||
push @EXPORT, qw(MANIFEST_FILE_TABLESPACEMAP);
|
||||
use constant MANIFEST_FILE_PGCONTROL => MANIFEST_TARGET_PGDATA . '/global/pg_control';
|
||||
use constant MANIFEST_FILE_PGCONTROL => MANIFEST_TARGET_PGDATA . '/' . DB_FILE_PGCONTROL;
|
||||
push @EXPORT, qw(MANIFEST_FILE_PGCONTROL);
|
||||
use constant MANIFEST_FILE_TABLESPACEMAP => MANIFEST_TARGET_PGDATA . '/' . DB_FILE_TABLESPACEMAP;
|
||||
push @EXPORT, qw(MANIFEST_FILE_TABLESPACEMAP);
|
||||
|
||||
####################################################################################################################################
|
||||
# Minimum ID for a user object in postgres
|
||||
@ -586,10 +604,10 @@ sub build
|
||||
# Skip certain files during backup
|
||||
if ($strLevel eq MANIFEST_TARGET_PGDATA &&
|
||||
(($strName =~ /^pg\_xlog\/.*/ && $bOnline) || # pg_xlog/ - this will be reconstructed
|
||||
$strName =~ /^postmaster\.pid$/ || # postmaster.pid - to avoid confusing postgres when restoring
|
||||
$strName =~ /^backup\_label\.old$/ || # backup_label.old - old backup labels are not useful
|
||||
$strName =~ /^recovery\.done$/ || # recovery.done - doesn't make sense to backup this file
|
||||
$strName =~ /^recovery\.conf$/)) # recovery.conf - doesn't make sense to backup this file
|
||||
$strName eq DB_FILE_BACKUPLABELOLD || # backup_label.old - old backup labels are not useful
|
||||
$strName eq DB_FILE_POSTMASTERPID || # postmaster.pid - to avoid confusing postgres after restore
|
||||
$strName eq DB_FILE_RECOVERYCONF || # recovery.conf - doesn't make sense to backup this file
|
||||
$strName eq DB_FILE_RECOVERYDONE)) # recovery.done - doesn't make sense to backup this file
|
||||
{
|
||||
next;
|
||||
}
|
||||
@ -779,7 +797,6 @@ sub build
|
||||
return logDebugReturn($strOperation);
|
||||
}
|
||||
|
||||
|
||||
####################################################################################################################################
|
||||
# linkCheck
|
||||
#
|
||||
|
@ -547,7 +547,7 @@ sub clean
|
||||
{
|
||||
# Skip the root path and backup.manifest in the base path
|
||||
if ($strName eq '.' ||
|
||||
(($strName eq FILE_MANIFEST || $strName eq DB_FILE_RECOVERY_CONF) && $strTarget eq MANIFEST_TARGET_PGDATA))
|
||||
(($strName eq FILE_MANIFEST || $strName eq DB_FILE_RECOVERYCONF) && $strTarget eq MANIFEST_TARGET_PGDATA))
|
||||
{
|
||||
next;
|
||||
}
|
||||
@ -672,7 +672,7 @@ sub clean
|
||||
|
||||
# Delete only if this is not the recovery.conf file. This is in case the user wants the recovery.conf file
|
||||
# preserved. It will be written/deleted/preserved as needed in recovery().
|
||||
if ($oManifest->dbPathGet(undef, $strManifestFile) eq DB_FILE_RECOVERY_CONF)
|
||||
if ($oManifest->dbPathGet(undef, $strManifestFile) eq DB_FILE_RECOVERYCONF)
|
||||
{
|
||||
&log(DETAIL, "preserve ${strType} ${strOsFile}");
|
||||
}
|
||||
@ -869,14 +869,14 @@ sub build
|
||||
####################################################################################################################################
|
||||
sub recovery
|
||||
{
|
||||
my $self = shift; # Class hash
|
||||
my $fDbVersion = shift; # Version to restore
|
||||
my $self = shift; # Class hash
|
||||
my $strDbVersion = shift; # Version to restore
|
||||
|
||||
# Assign function parameters, defaults, and log debug info
|
||||
my ($strOperation) = logDebugParam (OP_RESTORE_RECOVERY);
|
||||
|
||||
# Create recovery.conf path/file
|
||||
my $strRecoveryConf = $self->{strDbClusterPath} . '/' . DB_FILE_RECOVERY_CONF;
|
||||
my $strRecoveryConf = $self->{strDbClusterPath} . '/' . DB_FILE_RECOVERYCONF;
|
||||
|
||||
# See if recovery.conf already exists
|
||||
my $bRecoveryConfExists = $self->{oFile}->exists(PATH_DB_ABSOLUTE, $strRecoveryConf);
|
||||
@ -953,17 +953,17 @@ sub recovery
|
||||
|
||||
if ($strTargetAction ne OPTION_DEFAULT_RESTORE_TARGET_ACTION)
|
||||
{
|
||||
if ($fDbVersion >= 9.5)
|
||||
if ($strDbVersion >= PG_VERSION_95)
|
||||
{
|
||||
$strRecovery .= "recovery_target_action = '${strTargetAction}'\n";
|
||||
}
|
||||
elsif ($fDbVersion >= 9.1)
|
||||
elsif ($strDbVersion >= PG_VERSION_91)
|
||||
{
|
||||
$strRecovery .= "pause_at_recovery_target = 'false'\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
confess &log(ERROR, OPTION_TARGET_ACTION . ' option is only available in PostgreSQL >= 9.1')
|
||||
confess &log(ERROR, OPTION_TARGET_ACTION . ' option is only available in PostgreSQL >= ' . PG_VERSION_91)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1012,17 +1012,17 @@ sub process
|
||||
}
|
||||
|
||||
# Make sure that Postgres is not running
|
||||
if ($self->{oFile}->exists(PATH_DB_ABSOLUTE, $self->{strDbClusterPath} . '/' . FILE_POSTMASTER_PID))
|
||||
if ($self->{oFile}->exists(PATH_DB_ABSOLUTE, $self->{strDbClusterPath} . '/' . DB_FILE_POSTMASTERPID))
|
||||
{
|
||||
confess &log(ERROR, 'unable to restore while Postgres is running', ERROR_POSTMASTER_RUNNING);
|
||||
}
|
||||
|
||||
# If the restore will be destructive attempt to verify that $PGDATA is valid
|
||||
if ((optionGet(OPTION_DELTA) || optionGet(OPTION_FORCE)) &&
|
||||
!($self->{oFile}->exists(PATH_DB_ABSOLUTE, $self->{strDbClusterPath} . '/' . FILE_PG_VERSION) ||
|
||||
!($self->{oFile}->exists(PATH_DB_ABSOLUTE, $self->{strDbClusterPath} . '/' . DB_FILE_PGVERSION) ||
|
||||
$self->{oFile}->exists(PATH_DB_ABSOLUTE, $self->{strDbClusterPath} . '/' . FILE_MANIFEST)))
|
||||
{
|
||||
&log(WARN, '--delta or --force specified but unable to find \'' . FILE_PG_VERSION . '\' or \'' . FILE_MANIFEST .
|
||||
&log(WARN, '--delta or --force specified but unable to find \'' . DB_FILE_PGVERSION . '\' or \'' . FILE_MANIFEST .
|
||||
'\' in \'' . $self->{strDbClusterPath} . '\' 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.');
|
||||
@ -1175,7 +1175,7 @@ sub process
|
||||
# Skip the tablespace_map file in versions >= 9.5 so Postgres does not rewrite links in DB_PATH_PGTBLSPC.
|
||||
# The tablespace links have already been created by Restore::build().
|
||||
if ($strFile eq MANIFEST_FILE_TABLESPACEMAP &&
|
||||
$oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION) >= 9.5)
|
||||
$oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION) >= PG_VERSION_95)
|
||||
{
|
||||
next;
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -273,7 +273,7 @@ full backup (abort backup - local)
|
||||
DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
|
||||
DEBUG: BackupInfo->current=>: bTest = true
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -374,9 +374,9 @@ start (local)
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --no-compress --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --no-compress --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: File->new(): iThreadIdx = [undef], oProtocol = [object], strBackupPath = [TEST_PATH]/backrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRemote = none, strStanza = db
|
||||
@ -389,10 +389,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 0, oManifestHashRef = [hash], strPathFileOp = [undef], strPathOp = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
@ -689,11 +690,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -769,7 +773,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -990,7 +996,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1212,7 +1218,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -39,7 +39,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -251,9 +251,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --no-compress --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --no-compress --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --force --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: File->new(): iThreadIdx = [undef], oProtocol = [object], strBackupPath = [TEST_PATH]/backrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRemote = none, strStanza = db
|
||||
@ -266,10 +266,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 0, oManifestHashRef = [hash], strPathFileOp = [undef], strPathOp = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
@ -560,11 +561,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -640,7 +644,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -786,7 +792,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1032,7 +1038,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -39,7 +39,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -249,9 +249,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: File->new(): iThreadIdx = [undef], oProtocol = [object], strBackupPath = [TEST_PATH]/backrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRemote = none, strStanza = db
|
||||
@ -264,10 +264,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 0, oManifestHashRef = [hash], strPathFileOp = [undef], strPathOp = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
@ -556,11 +557,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -636,7 +640,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -782,7 +788,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1003,7 +1009,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -39,7 +39,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -250,9 +250,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/db/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --config=[TEST_PATH]/db/pgbackrest.conf --config-remote=[TEST_PATH]/backrest/pgbackrest.conf --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --force --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: File->new(): iThreadIdx = [undef], oProtocol = [object], strBackupPath = [TEST_PATH]/backrest, strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRemote = none, strStanza = db
|
||||
@ -265,10 +265,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 0, oManifestHashRef = [hash], strPathFileOp = [undef], strPathOp = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
@ -558,11 +559,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -638,7 +642,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -784,7 +790,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1029,7 +1035,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -41,7 +41,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -280,7 +280,7 @@ full backup (protocol timeout)
|
||||
DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
|
||||
DEBUG: BackupInfo->current=>: bTest = true
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -336,7 +336,7 @@ full backup (abort backup - local)
|
||||
DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
|
||||
DEBUG: BackupInfo->current=>: bTest = true
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -478,7 +478,7 @@ full backup (abort backup - remote)
|
||||
DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
|
||||
DEBUG: BackupInfo->current=>: bTest = true
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -539,9 +539,9 @@ start (remote)
|
||||
DEBUG: Common:::Lock::lockRelease(): bFailOnNoLock = false
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --no-compress --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --no-compress --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: Protocol::RemoteMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = [BACKREST_BIN] --command=backup --config=[TEST_PATH]/db/pgbackrest.conf --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --repo-path=[TEST_PATH]/backrest --stanza=db remote, strHost = 127.0.0.1, strUser = [USER-1]
|
||||
@ -556,10 +556,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
@ -869,11 +870,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -949,7 +953,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -1097,7 +1103,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1330,7 +1336,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -41,7 +41,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -264,9 +264,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --no-compress --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --no-compress --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --force --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: Protocol::RemoteMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = [BACKREST_BIN] --command=backup --config=[TEST_PATH]/db/pgbackrest.conf --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --repo-path=[TEST_PATH]/backrest --stanza=db remote, strHost = 127.0.0.1, strUser = [USER-1]
|
||||
@ -281,10 +281,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
@ -588,11 +589,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -668,7 +672,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -816,7 +822,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1073,7 +1079,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -41,7 +41,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -261,9 +261,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --force --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: Protocol::RemoteMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = [BACKREST_BIN] --command=backup --config=[TEST_PATH]/db/pgbackrest.conf --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --repo-path=[TEST_PATH]/backrest --stanza=db remote, strHost = 127.0.0.1, strUser = [USER-1]
|
||||
@ -278,10 +278,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
@ -582,11 +583,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -662,7 +666,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -810,7 +816,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1041,7 +1047,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -41,7 +41,7 @@ full backup
|
||||
DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
|
||||
DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -262,9 +262,9 @@ db-version="9.3"
|
||||
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6156904820763115222,"db-version":"9.3"}
|
||||
|
||||
full backup (resume)
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
> [BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --no-online --force --type=full --stanza=db backup --test --test-delay=0.2 --test-point=backup-resume=y
|
||||
------------------------------------------------------------------------------------------------------------------------------------
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
INFO: backup start: --cmd-remote=[BACKREST_BIN] --config=[TEST_PATH]/backrest/pgbackrest.conf --config-remote=[TEST_PATH]/db/pgbackrest.conf --db-host=127.0.0.1 --db-path=[TEST_PATH]/db/common --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --db-user=vagrant --force --hardlink --lock-path=[TEST_PATH]/backrest/lock --log-level-console=debug --log-level-file=trace --log-path=[TEST_PATH]/backrest/log --no-online --repo-path=[TEST_PATH]/backrest --stanza=db --start-fast --test --test-delay=0.2 --test-point=backup-resume=y --type=full
|
||||
DEBUG: Common:::Lock::lockAquire(): bFailOnNoLock = <true>, bRemote = <false>, iProcessIdx = [undef], strLockType = backup
|
||||
DEBUG: Common:::Lock::lockAquire=>: bResult = true
|
||||
DEBUG: Protocol::RemoteMaster->new(): iBufferMax = 4194304, iCompressLevel = 6, iCompressLevelNetwork = 3, iProtocolTimeout = 1830, strCommand = [BACKREST_BIN] --command=backup --config=[TEST_PATH]/db/pgbackrest.conf --db-port=[PORT-1] --db-socket-path=[TEST_PATH]/db --repo-path=[TEST_PATH]/backrest --stanza=db remote, strHost = 127.0.0.1, strUser = [USER-1]
|
||||
@ -279,10 +279,11 @@ full backup (resume)
|
||||
WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
|
||||
DEBUG: BackupInfo->delete(): strBackupLabel = [BACKUP-FULL-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
WARN: --no-online passed and postmaster.pid exists but --force was passed so backup will continue though it looks like the postmaster is running and the backup will probably not be consistent
|
||||
DEBUG: Manifest->build(): bOnline = false, bTablespace = [undef], oDatabaseMapRef = [undef], oFile = [object], oLastManifest = [undef], oTablespaceMapRef = [undef], strFilter = [undef], strLevel = [undef], strParentPath = [undef], strPath = [TEST_PATH]/db/common
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common/pg_tblspc, strPathType = db:absolute
|
||||
DEBUG: File->manifest(): oManifestHashRef = [hash], strPath = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
@ -584,11 +585,14 @@ DETAIL: check [TEST_PATH]/db/pg_config exists
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = deleteme, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = global, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DEBUG: File->manifestRecurse(): iDepth = 1, oManifestHashRef = [hash], strPathFileOp = pg_tblspc, strPathOp = [TEST_PATH]/db/common, strPathType = db:absolute
|
||||
DETAIL: remove file [TEST_PATH]/db/common/recovery.done
|
||||
DETAIL: preserve file [TEST_PATH]/db/common/recovery.conf
|
||||
DETAIL: remove link [TEST_PATH]/db/common/pg_stat - destination changed
|
||||
DETAIL: remove file [TEST_PATH]/db/common/deleteme/deleteme.txt
|
||||
DETAIL: remove path [TEST_PATH]/db/common/deleteme
|
||||
DETAIL: set mode 0700 on [TEST_PATH]/db/common/base
|
||||
INFO: cleanup removed 1 file, 1 path
|
||||
DETAIL: remove file [TEST_PATH]/db/common/backup_label.old
|
||||
INFO: cleanup removed 3 files, 1 path
|
||||
DEBUG: Restore->build(): oManifest = [object]
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/pg_stat, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
@ -664,7 +668,9 @@ DETAIL: restore file [TEST_PATH]/db/common/base/1/PG_VERSION - exists and matche
|
||||
DEBUG: File->hashSize=>: iSize = 3, strHash = e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DETAIL: restore file [TEST_PATH]/db/common/PG_VERSION - exists and matches backup (3B, 100%) checksum e1f7a3a299f62225cba076fc6d3d6e677f303482
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
DEBUG: File->exists=>: bExists = true
|
||||
DEBUG: File->remove(): bIgnoreMissing = <true>, bTemp = [undef], strPath = [TEST_PATH]/db/common/recovery.conf, strPathType = db:absolute
|
||||
DEBUG: File->remove=>: bRemoved = true
|
||||
INFO: wrote [TEST_PATH]/db/common/recovery.conf
|
||||
INFO: restore global/pg_control (copied last to ensure aborted restores cannot be started)
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/global/pg_control, strPathType = db:absolute
|
||||
@ -812,7 +818,7 @@ incr backup (add tablespace 1)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
@ -1067,7 +1073,7 @@ incr backup (resume and add tablespace 2)
|
||||
DEBUG: BackupInfo->last=>: strBackup = [BACKUP-FULL-2]
|
||||
INFO: last backup label = [BACKUP-FULL-2], version = [VERSION-1]
|
||||
DEBUG: Db->info(): oFile = [object], strDbPath = [TEST_PATH]/db/common
|
||||
DEBUG: Db->info=>: fDbVersion = 9.3, iCatalogVersion = 201306121, iControlVersion = 937, ullDbSysId = 6156904820763115222
|
||||
DEBUG: Db->info=>: iCatalogVersion = 201306121, iControlVersion = 937, strDbVersion = 9.3, ullDbSysId = 6156904820763115222
|
||||
DEBUG: BackupInfo->check=>: iDbHistoryId = 1
|
||||
DEBUG: File->exists(): strPath = [TEST_PATH]/db/common/postmaster.pid, strPathType = db:absolute
|
||||
DEBUG: File->exists=>: bExists = false
|
||||
|
@ -27,6 +27,7 @@ use pgBackRest::Common::Ini;
|
||||
use pgBackRest::Common::Log;
|
||||
use pgBackRest::Common::Wait;
|
||||
use pgBackRest::Config::Config;
|
||||
use pgBackRest::Db;
|
||||
use pgBackRest::File;
|
||||
use pgBackRest::FileCommon;
|
||||
use pgBackRest::Manifest;
|
||||
@ -311,11 +312,11 @@ sub BackRestTestBackup_ClusterStart
|
||||
|
||||
# Start the cluster
|
||||
my $strCommand = BackRestTestCommon_PgSqlBinPathGet() . "/pg_ctl start -o \"-c port=${iPort}" .
|
||||
(BackRestTestCommon_DbVersion() < 9.5 ? ' -c checkpoint_segments=1' : '');
|
||||
(BackRestTestCommon_DbVersion() < PG_VERSION_95 ? ' -c checkpoint_segments=1' : '');
|
||||
|
||||
if (BackRestTestCommon_DbVersion() >= '8.3')
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_83)
|
||||
{
|
||||
if (BackRestTestCommon_DbVersion() >= '9.5' && $bArchiveAlways)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_95 && $bArchiveAlways)
|
||||
{
|
||||
$strCommand .= " -c archive_mode=always";
|
||||
}
|
||||
@ -334,7 +335,7 @@ sub BackRestTestBackup_ClusterStart
|
||||
$strCommand .= " -c archive_command=true";
|
||||
}
|
||||
|
||||
if (BackRestTestCommon_DbVersion() >= '9.0')
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_90)
|
||||
{
|
||||
$strCommand .= " -c wal_level=hot_standby";
|
||||
|
||||
@ -345,7 +346,7 @@ sub BackRestTestBackup_ClusterStart
|
||||
}
|
||||
|
||||
$strCommand .= " -c log_error_verbosity=verbose" .
|
||||
" -c unix_socket_director" . (BackRestTestCommon_DbVersion() < '9.3' ? "y='" : "ies='") .
|
||||
" -c unix_socket_director" . (BackRestTestCommon_DbVersion() < PG_VERSION_93 ? "y='" : "ies='") .
|
||||
BackRestTestCommon_DbPathGet() . "'\" " .
|
||||
"-D ${strPath} -l ${strPath}/postgresql.log -s";
|
||||
|
||||
@ -395,7 +396,7 @@ sub BackRestTestBackup_ClusterCreate
|
||||
|
||||
# Don't link pg_xlog for versions < 9.2 because some recovery scenarios won't work.
|
||||
executeTest(BackRestTestCommon_PgSqlBinPathGet() .
|
||||
'/initdb' . (BackRestTestCommon_DbVersion() >= 9.2 ? ' --xlogdir=${strXlogPath}' : '') .
|
||||
'/initdb' . (BackRestTestCommon_DbVersion() >= PG_VERSION_92 ? ' --xlogdir=${strXlogPath}' : '') .
|
||||
" --pgdata=${strPath} --auth=trust");
|
||||
|
||||
BackRestTestBackup_ClusterStart($strPath, $iPort, undef, $bArchive);
|
||||
@ -503,7 +504,7 @@ sub BackRestTestBackup_PathCreate
|
||||
my $strFinalPath = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_TARGET}{$strTarget}{&MANIFEST_SUBKEY_PATH};
|
||||
|
||||
# Get tablespace path if this is a tablespace
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.0 &&
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_90 &&
|
||||
index($strTarget, DB_PATH_PGTBLSPC . '/') == 0)
|
||||
{
|
||||
my $iCatalog = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG};
|
||||
@ -630,7 +631,7 @@ sub BackRestTestBackup_ManifestTablespaceCreate
|
||||
my $strTablespacePath = $strLinkPath;
|
||||
my $strPathTarget = $strTarget;
|
||||
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.0)
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_90)
|
||||
{
|
||||
my $iCatalog = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG};
|
||||
my $strTablespaceId = 'PG_' . ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} . "_${iCatalog}";
|
||||
@ -740,7 +741,7 @@ sub BackRestTestBackup_FileCreate
|
||||
# Get tablespace path if this is a tablespace
|
||||
my $strPgPath;
|
||||
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.0 &&
|
||||
if ($$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_90 &&
|
||||
index($strTarget, DB_PATH_PGTBLSPC . '/') == 0)
|
||||
{
|
||||
my $iCatalog = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG};
|
||||
@ -781,7 +782,7 @@ sub BackRestTestBackup_ManifestKeyGet
|
||||
|
||||
# If target is a tablespace and pg version >= 9.0
|
||||
if (defined(${$oManifestRef}{&MANIFEST_SECTION_BACKUP_TARGET}{$strTarget}{&MANIFEST_SUBKEY_TABLESPACE_ID}) &&
|
||||
$$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.0)
|
||||
$$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_90)
|
||||
{
|
||||
my $iCatalog = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG};
|
||||
|
||||
@ -809,7 +810,7 @@ sub BackRestTestBackup_DbPathGet
|
||||
|
||||
# If target is a tablespace and pg version >= 9.0
|
||||
if (defined(${$oManifestRef}{&MANIFEST_SECTION_BACKUP_TARGET}{$strTarget}{&MANIFEST_SUBKEY_TABLESPACE_ID}) &&
|
||||
$$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.0)
|
||||
$$oManifestRef{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_90)
|
||||
{
|
||||
my $iCatalog = ${$oManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG};
|
||||
|
||||
@ -1746,7 +1747,7 @@ sub BackRestTestBackup_RestoreCompare
|
||||
if (!$bSynthetic)
|
||||
{
|
||||
# Tablespace_map file is not restored in versions >= 9.5 because it interferes with internal remapping features.
|
||||
if (${$oExpectedManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= 9.5)
|
||||
if (${$oExpectedManifestRef}{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} >= PG_VERSION_95)
|
||||
{
|
||||
delete(${$oExpectedManifestRef}{&MANIFEST_SECTION_TARGET_FILE}{MANIFEST_TARGET_PGDATA . '/tablespace_map'});
|
||||
}
|
||||
|
@ -74,7 +74,7 @@ sub archiveCheck
|
||||
my $bCompress = shift;
|
||||
|
||||
# Build the archive name to check for at the destination
|
||||
my $strArchiveCheck = "9.3-1/${strArchiveFile}-${strArchiveChecksum}";
|
||||
my $strArchiveCheck = PG_VERSION_93 . "-1/${strArchiveFile}-${strArchiveChecksum}";
|
||||
|
||||
if ($bCompress)
|
||||
{
|
||||
@ -290,8 +290,8 @@ sub BackRestTestBackup_Test
|
||||
&log(INFO, ' test archive when tmp file exists');
|
||||
|
||||
($strArchiveFile, $strSourceFile) = archiveGenerate($oFile, $strXlogPath, 2, $iArchiveNo);
|
||||
executeTest('touch ' . BackRestTestCommon_RepoPathGet() . "/archive/${strStanza}/9.3-1/" .
|
||||
substr($strArchiveFile, 0, 16) . "/${strArchiveFile}.tmp",
|
||||
executeTest('touch ' . BackRestTestCommon_RepoPathGet() . "/archive/${strStanza}/" . PG_VERSION_93 .
|
||||
'-1/' . substr($strArchiveFile, 0, 16) . "/${strArchiveFile}.tmp",
|
||||
{bRemote => $bRemote});
|
||||
}
|
||||
|
||||
@ -521,7 +521,7 @@ sub BackRestTestBackup_Test
|
||||
# Fix the database version
|
||||
if ($iError == 0)
|
||||
{
|
||||
$oInfo{&INFO_ARCHIVE_SECTION_DB}{&INFO_ARCHIVE_KEY_DB_VERSION} = '9.3';
|
||||
$oInfo{&INFO_ARCHIVE_SECTION_DB}{&INFO_ARCHIVE_KEY_DB_VERSION} = PG_VERSION_93;
|
||||
BackRestTestCommon_iniSave($strInfoFile, \%oInfo, $bRemote, true);
|
||||
}
|
||||
|
||||
@ -629,7 +629,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
executeTest('mkdir -p -m 770 ' . $oFile->pathGet(PATH_BACKUP_ARCHIVE),
|
||||
{bRemote => $bRemote});
|
||||
(new pgBackRest::ArchiveInfo($oFile->pathGet(PATH_BACKUP_ARCHIVE)))->check('9.3', 1234567890123456789);
|
||||
(new pgBackRest::ArchiveInfo($oFile->pathGet(PATH_BACKUP_ARCHIVE)))->check(PG_VERSION_93, 1234567890123456789);
|
||||
|
||||
if (defined($oLogTest))
|
||||
{
|
||||
@ -668,7 +668,7 @@ sub BackRestTestBackup_Test
|
||||
}
|
||||
|
||||
$oFile->copy(PATH_DB_ABSOLUTE, $strArchiveTestFile, # Source file
|
||||
PATH_BACKUP_ARCHIVE, "9.3-1/${strSourceFile}", # Destination file
|
||||
PATH_BACKUP_ARCHIVE, PG_VERSION_93 . "-1/${strSourceFile}", # Destination file
|
||||
false, # Source is not compressed
|
||||
$bCompress, # Destination compress based on test
|
||||
undef, undef, undef, # Unused params
|
||||
@ -764,7 +764,7 @@ sub BackRestTestBackup_Test
|
||||
# Create the test object
|
||||
my $oExpireTest = new pgBackRestTest::ExpireCommonTest($oFile, $oLogTest);
|
||||
|
||||
$oExpireTest->stanzaCreate($strStanza, '9.2');
|
||||
$oExpireTest->stanzaCreate($strStanza, PG_VERSION_92);
|
||||
use constant SECONDS_PER_DAY => 86400;
|
||||
my $lBaseTime = time() - (SECONDS_PER_DAY * 56);
|
||||
|
||||
@ -867,7 +867,7 @@ sub BackRestTestBackup_Test
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CATALOG} = 201306121;
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_CONTROL} = 937;
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_SYSTEM_ID} = 6156904820763115222;
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} = '9.3';
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_VERSION} = PG_VERSION_93;
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_DB}{&MANIFEST_KEY_DB_ID} = 1;
|
||||
|
||||
# Create the test directory
|
||||
@ -890,7 +890,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
BackRestTestBackup_Init($bRemote, $oFile, true, $oLogTest, $iThreadMax);
|
||||
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'PG_VERSION', '9.3',
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_FILE_PGVERSION, PG_VERSION_93,
|
||||
'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
|
||||
# Create base path
|
||||
@ -899,33 +899,34 @@ sub BackRestTestBackup_Test
|
||||
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/1/12000', 'BASE',
|
||||
'a3b357a3e395e43fcfb19bb13f3c1b5179279593', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/1/PG_VERSION', '9.3',
|
||||
'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/1/' . DB_FILE_PGVERSION,
|
||||
PG_VERSION_93, 'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
|
||||
BackRestTestBackup_ManifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/16384');
|
||||
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/16384/17000', 'BASE',
|
||||
'a3b357a3e395e43fcfb19bb13f3c1b5179279593', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/16384/PG_VERSION', '9.3',
|
||||
'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/16384/' . DB_FILE_PGVERSION,
|
||||
PG_VERSION_93, 'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
|
||||
BackRestTestBackup_ManifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/32768');
|
||||
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/32768/33000', '33000',
|
||||
'7f4c74dc10f61eef43e6ae642606627df1999b34', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/32768/PG_VERSION', '9.3',
|
||||
'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'base/32768/' . DB_FILE_PGVERSION,
|
||||
PG_VERSION_93, 'e1f7a3a299f62225cba076fc6d3d6e677f303482', $lTime);
|
||||
|
||||
# Create global path
|
||||
BackRestTestBackup_ManifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'global');
|
||||
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, 'global/pg_control', '[replaceme]',
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_FILE_PGCONTROL, '[replaceme]',
|
||||
'56fe5780b8dca9705e0c22032a83828860a21235', $lTime - 100);
|
||||
executeTest('cp ' . BackRestTestCommon_DataPathGet() . '/pg_control ' .
|
||||
BackRestTestCommon_DbCommonPathGet() . '/global/pg_control');
|
||||
utime($lTime - 100, $lTime - 100, BackRestTestCommon_DbCommonPathGet() . '/global/pg_control')
|
||||
BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_PGCONTROL);
|
||||
utime($lTime - 100, $lTime - 100, BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_PGCONTROL)
|
||||
or confess &log(ERROR, "unable to set time");
|
||||
$oManifest{&MANIFEST_SECTION_TARGET_FILE}{MANIFEST_TARGET_PGDATA . '/global/pg_control'}{&MANIFEST_SUBKEY_SIZE} = 8192;
|
||||
$oManifest{&MANIFEST_SECTION_TARGET_FILE}{MANIFEST_TARGET_PGDATA . '/' . DB_FILE_PGCONTROL}
|
||||
{&MANIFEST_SUBKEY_SIZE} = 8192;
|
||||
|
||||
# Create tablespace path
|
||||
BackRestTestBackup_ManifestPathCreate(\%oManifest, MANIFEST_TARGET_PGDATA, DB_PATH_PGTBLSPC);
|
||||
@ -1083,6 +1084,12 @@ sub BackRestTestBackup_Test
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
$strType = 'full';
|
||||
|
||||
# These files should never be backed up (this requires the next backup to do --force)
|
||||
BackRestTestCommon_FileCreate(BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_POSTMASTERPID, 'JUNK');
|
||||
BackRestTestCommon_FileCreate(BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_BACKUPLABELOLD, 'JUNK');
|
||||
BackRestTestCommon_FileCreate(BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_RECOVERYCONF, 'JUNK');
|
||||
BackRestTestCommon_FileCreate(BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_RECOVERYDONE, 'JUNK');
|
||||
|
||||
# Create files in root tblspc paths that should not be copied or deleted.
|
||||
# This will be checked later after a --force restore.
|
||||
my $strDoNotDeleteFile = BackRestTestCommon_DbTablespacePathGet(1, 2) . '/donotdelete.txt';
|
||||
@ -1098,7 +1105,7 @@ sub BackRestTestBackup_Test
|
||||
$strTmpPath, $bRemote);
|
||||
|
||||
my $oMungeManifest = BackRestTestCommon_manifestLoad("$strTmpPath/backup.manifest", $bRemote);
|
||||
$oMungeManifest->remove(MANIFEST_SECTION_TARGET_FILE, MANIFEST_TARGET_PGDATA . '/PG_VERSION', 'checksum');
|
||||
$oMungeManifest->remove(MANIFEST_SECTION_TARGET_FILE, MANIFEST_TARGET_PGDATA . '/' . DB_FILE_PGVERSION, 'checksum');
|
||||
BackRestTestCommon_manifestSave("$strTmpPath/backup.manifest", $oMungeManifest, $bRemote);
|
||||
|
||||
# Create a temp file in backup temp root to be sure it's deleted correctly
|
||||
@ -1106,7 +1113,11 @@ sub BackRestTestBackup_Test
|
||||
{bRemote => $bRemote});
|
||||
|
||||
$strFullBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, \%oManifest, 'resume',
|
||||
{strTest => TEST_BACKUP_RESUME});
|
||||
{strTest => TEST_BACKUP_RESUME,
|
||||
strOptionalParam => '--force'});
|
||||
|
||||
# Remove postmaster.pid so restore will succeed (the rest will be cleaned up)
|
||||
BackRestTestCommon_FileRemove(BackRestTestCommon_DbCommonPathGet() . '/' . DB_FILE_POSTMASTERPID);
|
||||
|
||||
# Misconfigure repo-path and check errors
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
@ -1192,12 +1203,13 @@ sub BackRestTestBackup_Test
|
||||
$bForce = true;
|
||||
|
||||
# Remove PG_VERSION
|
||||
BackRestTestBackup_FileRemove(\%oManifest, MANIFEST_TARGET_PGDATA, 'PG_VERSION');
|
||||
BackRestTestBackup_FileRemove(\%oManifest, MANIFEST_TARGET_PGDATA, DB_FILE_PGVERSION);
|
||||
|
||||
# Attempt the restore
|
||||
BackRestTestBackup_Restore($oFile, $strFullBackup, $strStanza, $bRemote, \%oManifest, undef, $bDelta, $bForce,
|
||||
undef, undef, undef, undef, undef, undef,
|
||||
'fail on missing PG_VERSION', ERROR_RESTORE_PATH_NOT_EMPTY, '--log-level-console=detail');
|
||||
'fail on missing ' . DB_FILE_PGVERSION, ERROR_RESTORE_PATH_NOT_EMPTY,
|
||||
'--log-level-console=detail');
|
||||
|
||||
# Write a backup.manifest file to make $PGDATA valid
|
||||
BackRestTestCommon_FileCreate(BackRestTestCommon_DbCommonPathGet() . '/backup.manifest', 'BOGUS');
|
||||
@ -1812,7 +1824,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
# Incr backup - fail on archive_mode=always when version >= 9.5
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
if (BackRestTestCommon_DbVersion() >= 9.5)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_95)
|
||||
{
|
||||
$strType = BACKUP_TYPE_INCR;
|
||||
|
||||
@ -1843,7 +1855,7 @@ sub BackRestTestBackup_Test
|
||||
BackRestTestBackup_PgSwitchXlog();
|
||||
|
||||
# Start a backup so the next backup has to restart it
|
||||
if (BackRestTestCommon_DbVersion() >= 9.3)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_93)
|
||||
{
|
||||
BackRestTestBackup_PgSelectOne("select pg_start_backup('test backup that will be cancelled', true)");
|
||||
}
|
||||
@ -1878,7 +1890,7 @@ sub BackRestTestBackup_Test
|
||||
BackRestTestBackup_PgExecute("update test set message = '$strNameMessage'", false, true);
|
||||
BackRestTestBackup_PgSwitchXlog();
|
||||
|
||||
if (BackRestTestCommon_DbVersion() >= 9.1)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_91)
|
||||
{
|
||||
BackRestTestBackup_PgExecute("select pg_create_restore_point('${strNameTarget}')", false, false);
|
||||
}
|
||||
@ -1950,7 +1962,7 @@ sub BackRestTestBackup_Test
|
||||
BackRestTestBackup_PgExecuteNoTrans("drop database test2");
|
||||
|
||||
# The test table lives in ts1 so it needs to be moved or dropped
|
||||
if (BackRestTestCommon_DbVersion() >= 9.0)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_90)
|
||||
{
|
||||
BackRestTestBackup_PgExecute('alter table test set tablespace pg_default');
|
||||
}
|
||||
@ -1965,7 +1977,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
# Restore (restore type = immediate, inclusive)
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
if (BackRestTestCommon_DbVersion() >= 9.4)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_94)
|
||||
{
|
||||
$bDelta = false;
|
||||
$bForce = true;
|
||||
@ -1997,7 +2009,7 @@ sub BackRestTestBackup_Test
|
||||
$strType = RECOVERY_TYPE_XID;
|
||||
$strTarget = $strXidTarget;
|
||||
$bTargetExclusive = undef;
|
||||
$strTargetAction = BackRestTestCommon_DbVersion() >= 9.1 ? 'promote' : undef;
|
||||
$strTargetAction = BackRestTestCommon_DbVersion() >= PG_VERSION_91 ? 'promote' : undef;
|
||||
$strTargetTimeline = undef;
|
||||
$oRecoveryHashRef = undef;
|
||||
$strComment = undef;
|
||||
@ -2109,7 +2121,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
# Restore (restore type = name)
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
if (BackRestTestCommon_DbVersion() >= 9.1)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_91)
|
||||
{
|
||||
$bDelta = true;
|
||||
$bForce = true;
|
||||
@ -2136,7 +2148,7 @@ sub BackRestTestBackup_Test
|
||||
|
||||
# Restore (restore type = default, timeline = 3)
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
if (BackRestTestCommon_DbVersion() >= 8.4)
|
||||
if (BackRestTestCommon_DbVersion() >= PG_VERSION_84)
|
||||
{
|
||||
$bDelta = true;
|
||||
$bForce = false;
|
||||
@ -2145,7 +2157,7 @@ sub BackRestTestBackup_Test
|
||||
$bTargetExclusive = undef;
|
||||
$strTargetAction = undef;
|
||||
$strTargetTimeline = 4;
|
||||
$oRecoveryHashRef = BackRestTestCommon_DbVersion() >= 9.0 ? {'standby-mode' => 'on'} : undef;
|
||||
$oRecoveryHashRef = BackRestTestCommon_DbVersion() >= PG_VERSION_90 ? {'standby-mode' => 'on'} : undef;
|
||||
$strComment = undef;
|
||||
$iExpectedExitStatus = undef;
|
||||
|
||||
|
@ -10,6 +10,11 @@ use strict;
|
||||
use warnings FATAL => qw(all);
|
||||
use Carp qw(confess);
|
||||
|
||||
use File::Basename qw(dirname);
|
||||
|
||||
use lib dirname($0) . '/../lib';
|
||||
use pgBackRest::Db;
|
||||
|
||||
use Exporter qw(import);
|
||||
our @EXPORT = qw();
|
||||
|
||||
@ -30,30 +35,81 @@ my $oyVm =
|
||||
# CentOS 6
|
||||
&OS_CO6 =>
|
||||
{
|
||||
db => ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5'],
|
||||
db_minimal => ['9.0', '9.1']
|
||||
db =>
|
||||
[
|
||||
PG_VERSION_90,
|
||||
PG_VERSION_91,
|
||||
PG_VERSION_92,
|
||||
PG_VERSION_93,
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
|
||||
db_minimal =>
|
||||
[
|
||||
PG_VERSION_90,
|
||||
PG_VERSION_91,
|
||||
],
|
||||
},
|
||||
|
||||
# CentOS 7
|
||||
&OS_CO7 =>
|
||||
{
|
||||
db => ['9.3', '9.4', '9.5'],
|
||||
db_minimal => ['9.3', '9.5']
|
||||
db =>
|
||||
[
|
||||
PG_VERSION_93,
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
|
||||
db_minimal =>
|
||||
[
|
||||
PG_VERSION_93,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
},
|
||||
|
||||
# Ubuntu 12.04
|
||||
&OS_U12 =>
|
||||
{
|
||||
db => ['8.3', '8.4', '9.0', '9.1', '9.2', '9.3', '9.4', '9.5'],
|
||||
db_minimal => ['8.3', '8.4']
|
||||
db =>
|
||||
[
|
||||
PG_VERSION_83,
|
||||
PG_VERSION_84,
|
||||
PG_VERSION_90,
|
||||
PG_VERSION_91,
|
||||
PG_VERSION_92,
|
||||
PG_VERSION_93,
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
|
||||
db_minimal =>
|
||||
[
|
||||
PG_VERSION_83,
|
||||
PG_VERSION_84,
|
||||
],
|
||||
},
|
||||
|
||||
# Ubuntu 14.04
|
||||
&OS_U14 =>
|
||||
{
|
||||
db => ['9.0', '9.1', '9.2', '9.3', '9.4', '9.5'],
|
||||
db_minimal => ['9.2', '9.4']
|
||||
}
|
||||
db =>
|
||||
[
|
||||
PG_VERSION_90,
|
||||
PG_VERSION_91,
|
||||
PG_VERSION_92,
|
||||
PG_VERSION_93,
|
||||
PG_VERSION_94,
|
||||
PG_VERSION_95,
|
||||
],
|
||||
|
||||
db_minimal =>
|
||||
[
|
||||
PG_VERSION_92,
|
||||
PG_VERSION_94,
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
####################################################################################################################################
|
||||
|
@ -18,6 +18,7 @@ use pgBackRest::BackupInfo;
|
||||
use pgBackRest::Common::Ini;
|
||||
use pgBackRest::Common::Log;
|
||||
use pgBackRest::Config::Config;
|
||||
use pgBackRest::Db;
|
||||
use pgBackRest::File;
|
||||
use pgBackRest::Manifest;
|
||||
|
||||
@ -316,7 +317,7 @@ sub archiveCreate
|
||||
|
||||
my $oStanza = $self->{oStanzaHash}{$strStanza};
|
||||
my $iArchiveIdx = 0;
|
||||
my $bSkipFF = $$oStanza{strDbVersion} <= 9.2;
|
||||
my $bSkipFF = $$oStanza{strDbVersion} <= PG_VERSION_92;
|
||||
|
||||
my $strArchive = defined($$oStanza{strArchiveLast}) ? $self->archiveNext($$oStanza{strArchiveLast}, $bSkipFF) :
|
||||
'000000010000000000000000';
|
||||
|
@ -598,7 +598,7 @@ eval
|
||||
(defined($$oTest{db}) ? ", db=$$oTest{db}" : '');
|
||||
|
||||
my $strImage = 'test-' . $iProcessIdx;
|
||||
my $strDbVersion = (defined($$oTest{db}) ? $$oTest{db} : '9.4');
|
||||
my $strDbVersion = (defined($$oTest{db}) ? $$oTest{db} : PG_VERSION_94);
|
||||
$strDbVersion =~ s/\.//;
|
||||
|
||||
&log($bDryRun && !$bVmOut || $bShowOutputAsync ? INFO : DEBUG, "${strTest}" .
|
||||
|
Loading…
Reference in New Issue
Block a user