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

Added stanza-upgrade command.

The stanza-upgrade command provides a mechanism for upgrading a stanza after upgrading to a new major version of PostgreSQL.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2017-04-03 10:42:55 -04:00
committed by David Steele
parent af7e4f4b4b
commit beead043ac
47 changed files with 4799 additions and 522 deletions

View File

@@ -207,7 +207,7 @@ local $EVAL_ERROR = undef; eval
################################################################################################################################
# Process stanza-create command
################################################################################################################################
if (commandTest(CMD_STANZA_CREATE))
if (commandTest(CMD_STANZA_CREATE) || commandTest(CMD_STANZA_UPGRADE))
{
if (!isRepoLocal())
{

View File

@@ -1017,6 +1017,23 @@
</command-example>
</command-example-list>
</command>
<!-- OPERATION - STANZA-UPGRADE COMMAND -->
<command id="stanza-upgrade" name="Stanza Upgrade">
<summary>Upgrade a stanza.</summary>
<text>Immediately after upgrading <postgres/> to a newer major version, the <br-option>db-path</br-option> for all <backrest/> configurations must be set to the new database location and the <cmd>stanza-upgrade</cmd> run on the backup host. If the database is offline use the <br-option>--no-online</br-option> option.</text>
<command-example-list>
<command-example title="Upgrade a stanza">
<text><code-block title="">
{[backrest-exe]} --stanza=db stanza-upgrade
</code-block>
Upgrade the <id>db</id> stanza to a new version of <postgres/>.</text>
</command-example>
</command-example-list>
</command>
</command-list>
</operation>
</doc>

View File

@@ -156,6 +156,14 @@
<release date="XXXX-XX-XX" version="1.18dev" title="UNDER DEVELOPMENT">
<release-core-list>
<release-feature-list>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="shang.cynthia"/>
</release-item-contributor-list>
<p>Added the stanza-upgrade command to provide a mechanism for upgrading a stanza after upgrading to a new major version of <postgres/>.</p>
</release-item>
<release-item>
<release-item-contributor-list>
<release-item-contributor id="shang.cynthia"/>

View File

@@ -12,6 +12,7 @@
<variable key="user-guide-os" keyword="co6">RHEL/CentOS 6</variable>
<variable key="pg-version">9.4</variable>
<variable key="pg-version-upgrade">9.5</variable>
<variable key="perl-lib-path">/usr/share/perl5</variable>
<variable key="perl-bin-path">/usr/bin</variable>
@@ -26,14 +27,26 @@
<variable key="db-path" keyword="default">/var/lib/postgresql/{[pg-version]}/{[postgres-cluster-demo]}</variable>
<variable key="db-path" keyword="co6">/var/lib/pgsql/{[pg-version]}/data</variable>
<variable key="db-path-upgrade" keyword="default">/var/lib/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}</variable>
<variable key="db-path-upgrade" keyword="co6">/var/lib/pgsql/{[pg-version-upgrade]}/data</variable>
<variable key="spool-path">/var/spool/pgbackrest</variable>
<variable key="postgres-install-upgrade" keyword="default">apt-get install postgresql-{[pg-version-upgrade]}</variable>
<variable key="postgres-install-upgrade" keyword="co6">yum install postgresql95-server</variable>
<variable key="postgres-config-demo" keyword="default">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
<variable key="postgres-config-demo" keyword="co6">{[db-path]}/postgresql.conf</variable>
<variable key="postgres-config-demo-upgrade" keyword="default">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/postgresql.conf</variable>
<variable key="postgres-config-demo-upgrade" keyword="co6">{[db-path-upgrade]}/postgresql.conf</variable>
<variable key="postgres-hba-demo" keyword="default">/etc/postgresql/{[pg-version]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
<variable key="postgres-hba-demo" keyword="co6">{[db-path]}/pg_hba.conf</variable>
<variable key="postgres-hba-demo-upgrade" keyword="default">/etc/postgresql/{[pg-version-upgrade]}/{[postgres-cluster-demo]}/pg_hba.conf</variable>
<variable key="postgres-hba-demo-upgrade" keyword="co6">{[db-path-upgrade]}/pg_hba.conf</variable>
<variable key="postgres-pgpass">/home/postgres/.pgpass</variable>
<variable key="postgres-log-demo" keyword="default">/var/log/postgresql/postgresql-{[pg-version]}-{[postgres-cluster-demo]}.log</variable>
@@ -79,9 +92,15 @@
<variable key="db-cluster-create" keyword="default">pg_createcluster {[pg-version]} {[postgres-cluster-demo]}</variable>
<variable key="db-cluster-create" keyword="co6">service postgresql-{[pg-version]} initdb</variable>
<variable key="db-cluster-create-upgrade" keyword="default">pg_createcluster {[pg-version-upgrade]} {[postgres-cluster-demo]}</variable>
<variable key="db-cluster-create-upgrade" keyword="co6">service postgresql-{[pg-version-upgrade]} initdb</variable>
<variable key="db-cluster-start" keyword="default">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} start</variable>
<variable key="db-cluster-start" keyword="co6">service postgresql-{[pg-version]} start</variable>
<variable key="db-cluster-start-upgrade" keyword="default">pg_ctlcluster {[pg-version-upgrade]} {[postgres-cluster-demo]} start</variable>
<variable key="db-cluster-start-upgrade" keyword="co6">service postgresql-{[pg-version-upgrade]} start</variable>
<variable key="db-cluster-stop" keyword="default">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} stop</variable>
<variable key="db-cluster-stop" keyword="co6">service postgresql-{[pg-version]} stop</variable>
@@ -90,6 +109,9 @@
<variable key="db-cluster-reload" keyword="default">pg_ctlcluster {[pg-version]} {[postgres-cluster-demo]} reload</variable>
<variable key="db-cluster-reload" keyword="co6">service postgresql-{[pg-version]} reload</variable>
<variable key="db-cluster-check-upgrade" keyword="default">pg_lsclusters</variable>
<variable key="db-cluster-check-upgrade" keyword="co6">service postgresql-{[pg-version-upgrade]} status</variable>
</variable-list>
<!-- SECTION => INTRODUCTION -->
@@ -1383,7 +1405,7 @@
</execute>
</execute-list>
<p>Commands are run the same as on a single host configuration except that the <cmd>backup</cmd> and <cmd>expire</cmd> command are run from the <host>backup</host> host and all other commands are run from the <host>database</host> host.</p>
<p>Commands are run the same as on a single host configuration except that some commands such as <cmd>backup</cmd> and <cmd>expire</cmd> are run from the <host>backup</host> host instead of the <host>database</host> host.</p>
<p>Create the stanza in the new repository.</p>
@@ -2057,4 +2079,277 @@
<p><backrest/> creates a standby backup that is identical to a backup performed on the master. It does this by starting/stopping the backup on the <host>db-master</host> host, copying only files that are replicated from the <host>db-standby</host> host, then copying the remaining few files from the <host>db-master</host> host. This means that logs and statistics from the master database will be included in the backup.</p>
</section>
<!-- SECTION => STANZA UPGRADE -->
<section id="upgrade-stanza" depend="standby-backup">
<title>Upgrading <postgres/></title>
<cmd-description key="stanza-upgrade"/>
<p>The following instructions are not meant to be a comprehensive guide for upgrading <postgres/>, rather they will outline the general process for upgrading a master and standby with the intent of demonstrating the steps required to reconfigure <backrest/>. It is recommended that a backup be taken prior to upgrading.</p>
<execute-list host="{[host-db-master]}">
<title>Install new <postgres/> version</title>
<execute user="root" err-suppress="y">
<exe-cmd>{[postgres-install-upgrade]}</exe-cmd>
<exe-cmd-extra>-y</exe-cmd-extra>
</execute>
</execute-list>
<p>Create the new cluster. If the <postgres/> install creates a default cluster, then remove it to avoid confusion.</p>
<execute-list host="{[host-db-master]}">
<title>Drop default cluster and create the new demo cluster</title>
<execute user="root" keyword="default">
<exe-cmd>pg_dropcluster {[pg-version-upgrade]} main</exe-cmd>
</execute>
<execute user="postgres" keyword="default">
<exe-cmd>
/usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb
-D {[db-path-upgrade]} -k -A peer</exe-cmd>
</execute>
<execute user="root" output="y" filter="n">
<exe-cmd>{[db-cluster-create-upgrade]}</exe-cmd>
</execute>
</execute-list>
<p>Stop the old cluster on the standby since it will be restored from the newly upgraded cluster to ensure the database system id is identical on both the master and standby. Install the new <postgres/> binaries on the standby and create the cluster.</p>
<execute-list host="{[host-db-standby]}">
<title>Stop old cluster</title>
<execute user="root">
<exe-cmd>{[db-cluster-stop]}</exe-cmd>
</execute>
<execute user="root" err-suppress="y">
<exe-cmd>{[postgres-install-upgrade]}</exe-cmd>
<exe-cmd-extra>-y</exe-cmd-extra>
</execute>
<execute user="root" keyword="default">
<exe-cmd>pg_dropcluster {[pg-version-upgrade]} main</exe-cmd>
</execute>
<execute user="postgres" keyword="default">
<exe-cmd>
/usr/lib/postgresql/{[pg-version-upgrade]}/bin/initdb
-D {[db-path-upgrade]} -k -A peer</exe-cmd>
</execute>
<execute user="root" output="y" filter="n">
<exe-cmd>{[db-cluster-create-upgrade]}</exe-cmd>
</execute>
</execute-list>
<p>Stop the old cluster on the master and perform the upgrade.</p>
<execute-list host="{[host-db-master]}">
<title>Stop old cluster and perform the upgrade</title>
<execute user="root">
<exe-cmd>{[db-cluster-stop]}</exe-cmd>
</execute>
<execute user="postgres" output="y" keyword="default">
<exe-cmd>sh -c 'cd /var/lib/postgresql &amp;&amp;
/usr/lib/postgresql/{[pg-version-upgrade]}/bin/pg_upgrade
{[dash]}-old-bindir=/usr/lib/postgresql/{[pg-version]}/bin
{[dash]}-new-bindir=/usr/lib/postgresql/{[pg-version-upgrade]}/bin
{[dash]}-old-datadir={[db-path]}
{[dash]}-new-datadir={[db-path-upgrade]}
{[dash]}-old-options=" -c config_file={[postgres-config-demo]}"
{[dash]}-new-options=" -c config_file={[postgres-config-demo-upgrade]}"'
</exe-cmd>
<exe-highlight>Upgrade Complete</exe-highlight>
</execute>
<execute user="postgres" output="y" keyword="co6">
<exe-cmd>sh -c 'cd /var/lib/pgsql &amp;&amp;
/usr/pgsql-{[pg-version-upgrade]}/bin/pg_upgrade
{[dash]}-old-bindir=/usr/pgsql-{[pg-version]}/bin
{[dash]}-new-bindir=/usr/pgsql-{[pg-version-upgrade]}/bin
{[dash]}-old-datadir={[db-path]}
{[dash]}-new-datadir={[db-path-upgrade]}
{[dash]}-old-options=" -c config_file={[postgres-config-demo]}"
{[dash]}-new-options=" -c config_file={[postgres-config-demo-upgrade]}"'
</exe-cmd>
<exe-highlight>Upgrade Complete</exe-highlight>
</execute>
</execute-list>
<p>Configure the new cluster settings and port.</p>
<postgres-config host="{[host-db-master]}" file="{[postgres-config-demo-upgrade]}">
<title>Configure <postgres/></title>
<postgres-config-option key="archive_command">'{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} archive-push %p'</postgres-config-option>
<postgres-config-option key="archive_mode">on</postgres-config-option>
<postgres-config-option key="wal_level">hot_standby</postgres-config-option>
<postgres-config-option key="max_wal_senders">3</postgres-config-option>
<postgres-config-option key="listen_addresses">'*'</postgres-config-option>
<postgres-config-option key="log_line_prefix">''</postgres-config-option>
<postgres-config-option key="port">5432</postgres-config-option>
</postgres-config>
<p>Update the <backrest/> configuration on all systems to point to the new cluster.</p>
<backrest-config host="{[host-db-master]}" file="{[backrest-config-demo]}">
<title>Upgrade the <br-option>db-path</br-option></title>
<backrest-config-option section="demo" key="db-path">{[db-path-upgrade]}</backrest-config-option>
</backrest-config>
<backrest-config host="{[host-db-standby]}" file="{[backrest-config-demo]}">
<title>Upgrade the <br-option>db-path</br-option></title>
<backrest-config-option section="demo" key="db-path">{[db-path-upgrade]}</backrest-config-option>
</backrest-config>
<backrest-config host="{[host-backup]}" owner="backrest:postgres" file="{[backrest-config-demo]}">
<title>Upgrade <br-option>db1-path</br-option> and <br-option>db2-path</br-option>, disable backup from standby</title>
<backrest-config-option section="demo" key="db1-path">{[db-path-upgrade]}</backrest-config-option>
<backrest-config-option section="demo" key="db2-path">{[db-path-upgrade]}</backrest-config-option>
<backrest-config-option section="global" key="backup-standby">n</backrest-config-option>
</backrest-config>
<execute-list host="{[host-db-master]}">
<title>Copy hba configuration</title>
<execute user="root">
<exe-cmd>cp {[postgres-hba-demo]}
{[postgres-hba-demo-upgrade]}</exe-cmd>
</execute>
</execute-list>
<p>Before starting the new cluster, the <cmd>stanza-upgrade</cmd> command must be run on the server where the <backrest/> repository is located.</p>
<execute-list host="{[host-backup]}">
<title>Upgrade the stanza</title>
<execute user="backrest" output="y">
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-no-online
{[dash]}-log-level-console=info stanza-upgrade</exe-cmd>
<exe-highlight>completed successfully</exe-highlight>
</execute>
</execute-list>
<p>Start the new cluster and confirm it is successfully installed.</p>
<execute-list host="{[host-db-master]}">
<title>Start new cluster</title>
<execute user="root" output="y">
<exe-cmd>{[db-cluster-start-upgrade]}</exe-cmd>
</execute>
</execute-list>
<p>Test configuration using the <cmd>check</cmd> command. The warning on the <host>backup</host> host regarding the standby being down is expected and can be ignored.</p>
<execute-list host="{[host-db-master]}">
<title>Check configuration</title>
<execute output="y" filter="n" >
<exe-cmd>{[db-cluster-check-upgrade]}</exe-cmd>
</execute>
<execute output="y" filter="n" >
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} check</exe-cmd>
</execute>
</execute-list>
<execute-list host="{[host-backup]}">
<title>Check configuration</title>
<execute user="backrest" output="y" filter="n" >
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} check</exe-cmd>
</execute>
</execute-list>
<p>Remove the old clusters.</p>
<execute-list host="{[host-db-master]}">
<title>Remove old cluster</title>
<execute keyword="default" user="root">
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
</execute>
<execute keyword="co6" user="root">
<exe-cmd>rm -rf {[db-path]}</exe-cmd>
</execute>
</execute-list>
<execute-list host="{[host-db-standby]}">
<title>Remove old cluster</title>
<execute keyword="default" user="root">
<exe-cmd>pg_dropcluster {[pg-version]} {[postgres-cluster-demo]}</exe-cmd>
</execute>
<execute keyword="co6" user="root">
<exe-cmd>rm -rf {[db-path]}</exe-cmd>
</execute>
</execute-list>
<p>Run a full backup on the new cluster and then restore the standby from the backup.</p>
<execute-list host="{[host-backup]}">
<title>Run a full backup</title>
<execute user="backrest">
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-type=full backup</exe-cmd>
</execute>
</execute-list>
<execute-list host="{[host-db-standby]}">
<title>Restore the {[postgres-cluster-demo]} standby cluster</title>
<execute>
<exe-cmd>{[project-exe]} {[dash]}-stanza={[postgres-cluster-demo]} {[dash]}-delta restore</exe-cmd>
</execute>
</execute-list>
<postgres-config host="{[host-db-standby]}" file="{[postgres-config-demo-upgrade]}">
<title>Configure <postgres/></title>
<postgres-config-option key="hot_standby">on</postgres-config-option>
<postgres-config-option key="port">5432</postgres-config-option>
</postgres-config>
<postgres-config host="{[host-db-standby]}" file="{[postgres-config-demo-upgrade]}" show="n">
<title>Configure <postgres/></title>
<postgres-config-option key="log_filename">'postgresql.log'</postgres-config-option>
<postgres-config-option key="log_line_prefix">''</postgres-config-option>
<postgres-config-option key="ssl" keyword="default">true</postgres-config-option>
<postgres-config-option key="ssl_cert_file" keyword="default">'/etc/ssl/certs/ssl-cert-snakeoil.pem'</postgres-config-option>
<postgres-config-option key="ssl_key_file" keyword="default">'/etc/ssl/private/ssl-cert-snakeoil.key'</postgres-config-option>
</postgres-config>
<execute-list host="{[host-db-standby]}">
<title>Start <postgres/></title>
<execute user="root">
<exe-cmd>{[db-cluster-start-upgrade]}</exe-cmd>
</execute>
<execute show="n">
<exe-cmd>{[db-cluster-wait]}</exe-cmd>
</execute>
</execute-list>
<p>Backup from standby can be enabled now that the standby is restored.</p>
<backrest-config host="{[host-backup]}" owner="backrest:postgres" file="{[backrest-config-demo]}">
<title>Reenable backup from standby</title>
<backrest-config-option section="global" key="backup-standby">y</backrest-config-option>
</backrest-config>
</section>
</doc>

View File

@@ -11,6 +11,7 @@ use parent 'pgBackRest::Common::Ini';
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use English '-no_match_vars';
use Exporter qw(import);
use File::Basename qw(dirname basename);
@@ -22,11 +23,11 @@ use pgBackRest::Common::Exception;
use pgBackRest::Common::Ini;
use pgBackRest::Common::Log;
use pgBackRest::Archive::ArchiveCommon;
use pgBackRest::BackupInfo;
use pgBackRest::Config::Config;
use pgBackRest::DbVersion;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
####################################################################################################################################
@@ -41,11 +42,11 @@ use constant ARCHIVE_INFO_FILE => 'archive.
use constant INFO_ARCHIVE_SECTION_DB => INFO_BACKUP_SECTION_DB;
push @EXPORT, qw(INFO_ARCHIVE_SECTION_DB);
use constant INFO_ARCHIVE_SECTION_DB_HISTORY => INFO_BACKUP_SECTION_DB_HISTORY;
push @EXPORT, qw(INFO_ARCHIVE_SECTION_DB);
push @EXPORT, qw(INFO_ARCHIVE_SECTION_DB_HISTORY);
use constant INFO_ARCHIVE_KEY_DB_VERSION => MANIFEST_KEY_DB_VERSION;
push @EXPORT, qw(INFO_ARCHIVE_KEY_DB_VERSION);
use constant INFO_ARCHIVE_KEY_DB_ID => INFO_BACKUP_KEY_HISTORY_ID;
use constant INFO_ARCHIVE_KEY_DB_ID => MANIFEST_KEY_DB_ID;
push @EXPORT, qw(INFO_ARCHIVE_KEY_DB_ID);
use constant INFO_ARCHIVE_KEY_DB_SYSTEM_ID => MANIFEST_KEY_SYSTEM_ID;
push @EXPORT, qw(INFO_ARCHIVE_KEY_DB_SYSTEM_ID);
@@ -249,15 +250,25 @@ sub reconstruct
my $strInvalidFileStructure = undef;
# Get the upper level directory names, e.g. 9.4-1 - don't error if can't find anything
foreach my $strVersionDir (fileList($self->{strArchiveClusterPath}, REGEX_ARCHIVE_DIR_DB_VERSION, 'forward', true))
my @stryArchiveId = fileList($self->{strArchiveClusterPath}, REGEX_ARCHIVE_DIR_DB_VERSION, 'forward', true);
my %hDbHistoryVersion;
# Get the db-version and db-id (history id) from the upper level directory names, e.g. 9.4-1
foreach my $strArchiveId (@stryArchiveId)
{
# Get the db-version and db-id (history id) from the directory name
my ($strDbVersion, $iDbHistoryId) = split("-", $strVersionDir);
my ($strDbVersion, $iDbHistoryId) = split("-", $strArchiveId);
$hDbHistoryVersion{$iDbHistoryId} = $strDbVersion;
}
# Loop through the DBs in the order they were created as indicated by the db-id so that the last one is set in the db section
foreach my $iDbHistoryId (sort {$a <=> $b} keys %hDbHistoryVersion)
{
my $strDbVersion = $hDbHistoryVersion{$iDbHistoryId};
my $strVersionDir = $strDbVersion . "-" . $iDbHistoryId;
# Get the name of the first archive directory
my $strArchiveDir =
(fileList($self->{strArchiveClusterPath}."/${strVersionDir}", REGEX_ARCHIVE_DIR_WAL, 'forward', true))[0];
(fileList($self->{strArchiveClusterPath} . "/${strVersionDir}", REGEX_ARCHIVE_DIR_WAL, 'forward', true))[0];
# Continue if any file structure or missing files info
if (!defined($strArchiveDir))
@@ -293,7 +304,7 @@ sub reconstruct
if ($strArchiveFile =~ "^.*\.$oFile->{strCompressExtension}\$")
{
gunzip $hFile => \$tBlock
gunzip($hFile => \$tBlock)
or confess &log(ERROR,
"gunzip failed with error: " . $GunzipError .
" on file ${strArchiveFilePath}", ERROR_FILE_READ);
@@ -315,18 +326,39 @@ sub reconstruct
confess &log(ERROR, "unable to read database system identifier", ERROR_FILE_READ);
}
# ??? For stanza-upgrade, need to test that the history does not already exist
# Fill db section and db history section
$self->dbSectionSet($strDbVersion, $ullDbSysId, $iDbHistoryId);
}
# ??? This is a precursor for stanza-upgrade: If the DB section does not exist, then there were no valid directories to read
# from so create the file. Can't raise warning b/c log-log-level console in calling routine is turned off -- determine how to
# handle cases above where directory structure or files are causing errors
# If the DB section does not exist, then there were no valid directories to read from so create the DB and History sections.
if (!$self->test(INFO_ARCHIVE_SECTION_DB))
{
$self->create($strCurrentDbVersion, $ullCurrentDbSysId, false);
}
# Else if it does exist but does not match the current DB, then update the DB section
else
{
# Turn off console logging to control when to display the error
logDisable();
eval
{
$self->check($strCurrentDbVersion, $ullCurrentDbSysId, false);
logEnable();
return true;
}
or do
{
# Reset the console logging
logEnable();
# Confess unhandled errors
confess $EVAL_ERROR if (exceptionCode($EVAL_ERROR) != ERROR_ARCHIVE_MISMATCH);
# Update the DB section if it does not match the current database
$self->dbSectionSet($strCurrentDbVersion, $ullCurrentDbSysId, $self->dbHistoryIdGet(false)+1);
};
}
# Return from function and log return values if any
return logDebugReturn
@@ -375,6 +407,40 @@ sub dbHistoryIdGet
);
}
####################################################################################################################################
# dbHistoryList
#
# Get the data from the db history section.
####################################################################################################################################
sub dbHistoryList
{
my $self = shift;
my
(
$strOperation,
) = logDebugParam
(
__PACKAGE__ . '->dbHistoryList',
);
my %hDbHash;
foreach my $iHistoryId ($self->keys(INFO_ARCHIVE_SECTION_DB_HISTORY))
{
$hDbHash{$iHistoryId}{&INFO_DB_VERSION} =
$self->get(INFO_ARCHIVE_SECTION_DB_HISTORY, $iHistoryId, INFO_ARCHIVE_KEY_DB_VERSION);
$hDbHash{$iHistoryId}{&INFO_SYSTEM_ID} =
$self->get(INFO_ARCHIVE_SECTION_DB_HISTORY, $iHistoryId, INFO_ARCHIVE_KEY_DB_ID);
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'hDbHash', value => \%hDbHash}
);
}
####################################################################################################################################
# dbSectionSet
#

View File

@@ -7,12 +7,14 @@ use parent 'pgBackRest::Common::Ini';
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use English '-no_match_vars';
use Exporter qw(import);
our @EXPORT = qw();
use File::Basename qw(dirname basename);
use File::stat;
use pgBackRest::Archive::ArchiveInfo;
use pgBackRest::BackupCommon;
use pgBackRest::Common::Exception;
use pgBackRest::Common::Ini;
@@ -20,6 +22,7 @@ use pgBackRest::Common::Log;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
@@ -37,10 +40,6 @@ use constant INFO_BACKUP_SECTION_BACKUP => MANIFEST_
push @EXPORT, qw(INFO_BACKUP_SECTION_BACKUP);
use constant INFO_BACKUP_SECTION_BACKUP_CURRENT => INFO_BACKUP_SECTION_BACKUP . ':current';
push @EXPORT, qw(INFO_BACKUP_SECTION_BACKUP_CURRENT);
use constant INFO_BACKUP_SECTION_DB => 'db';
push @EXPORT, qw(INFO_BACKUP_SECTION_DB);
use constant INFO_BACKUP_SECTION_DB_HISTORY => INFO_BACKUP_SECTION_DB . ':history';
push @EXPORT, qw(INFO_BACKUP_SECTION_DB_HISTORY);
use constant INFO_BACKUP_KEY_ARCHIVE_CHECK => MANIFEST_KEY_ARCHIVE_CHECK;
push @EXPORT, qw(INFO_BACKUP_KEY_ARCHIVE_CHECK);
@@ -192,13 +191,21 @@ sub reconstruct
(
$strOperation,
$bSave,
$bRequired,
$bRequired, # If false then must be creating or reconstructing so the DB info must be supplied
$strDbVersion,
$ullDbSysId,
$iControlVersion,
$iCatalogVersion,
) =
logDebugParam
(
__PACKAGE__ . '->reconstruct', \@_,
{name => 'bSave', default => true},
{name => 'bRequired', default => true},
{name => 'strDbVersion', required => false},
{name => 'ullDbSysId', required => false},
{name => 'iControlVersion', required => false},
{name => 'iCatalogVersion', required => false},
);
# Check for backups that are not in FILE_BACKUP_INFO
@@ -211,13 +218,80 @@ sub reconstruct
if (!$self->current($strBackup) && fileExists($strManifestFile))
{
&log(WARN, "backup ${strBackup} found in repository added to " . FILE_BACKUP_INFO);
my $oManifest = pgBackRest::Manifest->new($strManifestFile);
# If we are reconstructing, then we need to be sure this db-id and version is in the history section. Also if it
# has a db-id greater than anything in the history section, then add it to the db section.
if (!$bRequired)
{
my $hDbList = $self->dbHistoryList();
my $iDbId = $oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_ID);
my $iDbIdMax = 0;
my $ullDbSysId = $oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_SYSTEM_ID);
my $strDbVersion = $oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_VERSION);
# If this is the max history id then set the db section
foreach my $iDbHistoryId (keys %{$hDbList})
{
# If the current history ID is greater than the running max, then set it to the current id
if ($iDbHistoryId > $iDbIdMax)
{
$iDbIdMax = $iDbHistoryId;
}
}
if ($iDbId >= $iDbIdMax)
{
$self->dbSectionSet($strDbVersion, $oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CONTROL),
$oManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_CATALOG), $ullDbSysId, $iDbId);
}
}
&log(WARN, "backup ${strBackup} found in repository added to " . FILE_BACKUP_INFO);
$self->add($oManifest, $bSave, $bRequired);
}
}
# If reconstructing, make sure the DB section is correct
if (!$bRequired)
{
# If any database info is missing, then assert
if (!defined($strDbVersion) || !defined($ullDbSysId) || !defined($iControlVersion) || !defined($iCatalogVersion))
{
confess &log(ASSERT, "backup info cannot be reconstructed without database information");
}
# If the DB section does not exist then create the db and history section
elsif (!$self->test(INFO_BACKUP_SECTION_DB))
{
$self->create($strDbVersion, $ullDbSysId, $iControlVersion, $iCatalogVersion, $bSave);
}
# Else update the DB section if it does not match the current database
else
{
# Turn off console logging to control when to display the error
logDisable();
eval
{
$self->check($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId, $bRequired);
logEnable();
return true;
}
or do
{
# Reset the console logging
logEnable();
# Confess unhandled errors
confess $EVAL_ERROR if (exceptionCode($EVAL_ERROR) != ERROR_BACKUP_MISMATCH);
# Update the DB section if it does not match the current database
$self->dbSectionSet($strDbVersion, $iControlVersion, $iCatalogVersion, $ullDbSysId, $self->dbHistoryIdGet(false)+1);
};
}
}
# Remove backups from FILE_BACKUP_INFO that are no longer in the repository
foreach my $strBackup ($self->keys(INFO_BACKUP_SECTION_BACKUP_CURRENT))
{
@@ -404,8 +478,18 @@ sub add
$oBackupManifest->get(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_TYPE));
$self->set(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackupLabel, INFO_BACKUP_KEY_VERSION,
$oBackupManifest->get(INI_SECTION_BACKREST, INI_KEY_VERSION));
$self->set(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackupLabel, INFO_BACKUP_KEY_HISTORY_ID,
$self->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_HISTORY_ID));
if ($bRequired)
{
$self->set(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackupLabel, INFO_BACKUP_KEY_HISTORY_ID,
$self->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_HISTORY_ID));
}
# If we are reconstructing, then the history id must be taken from the manifest
else
{
$self->set(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackupLabel, INFO_BACKUP_KEY_HISTORY_ID,
$oBackupManifest->get(MANIFEST_SECTION_BACKUP_DB, MANIFEST_KEY_DB_ID));
}
if (!$oBackupManifest->test(MANIFEST_SECTION_BACKUP, MANIFEST_KEY_TYPE, undef, BACKUP_TYPE_FULL))
{
@@ -505,6 +589,138 @@ sub list
);
}
####################################################################################################################################
# backupArchiveDbHistoryId
#
# Gets the backup.info db-id for the archiveId passed.
####################################################################################################################################
sub backupArchiveDbHistoryId
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$strArchiveId,
$strPathBackupArchive,
) =
logDebugParam
(
__PACKAGE__ . '->backupArchiveDbHistoryId', \@_,
{name => 'strArchiveId'},
{name => 'strPathBackupArchive'},
);
# List of backups associated with the db-id provided
my @stryArchiveBackup;
# Build the db list from the history in the backup info and archive info file
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($strPathBackupArchive, true);
my $hDbListArchive = $oArchiveInfo->dbHistoryList();
my $hDbListBackup = $self->dbHistoryList();
my $iDbHistoryId = undef;
# Get the db-version and db-id (history id) from the archiveId
my ($strDbVersionArchive, $iDbIdArchive) = split("-", $strArchiveId);
# Get the DB system ID to map back to the backup info
my $ullDbSysIdArchive = $$hDbListArchive{$iDbIdArchive}{&INFO_SYSTEM_ID};
# Get the db-id from backup info history that corresponds to the archive db-version and db-system-id
foreach my $iDbIdBackup (keys %{$hDbListBackup})
{
if ($$hDbListBackup{$iDbIdBackup}{&INFO_SYSTEM_ID} == $ullDbSysIdArchive &&
$$hDbListBackup{$iDbIdBackup}{&INFO_DB_VERSION} eq $strDbVersionArchive)
{
$iDbHistoryId = $iDbIdBackup;
last;
}
}
# If the database is not found in the backup.info history list
if (!defined($iDbHistoryId))
{
# Check to see that the current DB sections match for the archive and backup info files
if (!($oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
($self->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION)))) ||
!($oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_SYSTEM_ID, undef,
($self->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_SYSTEM_ID)))))
{
# This should never happen unless the backup.info file is corrupt
confess &log(ASSERT, "the archive and backup database sections do not match", ERROR_FILE_INVALID);
}
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'iDbHistoryId', value => $iDbHistoryId}
);
}
####################################################################################################################################
# listByArchiveId
#
# Filters a list of backups by the archiveId passed.
####################################################################################################################################
sub listByArchiveId
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$strArchiveId,
$strPathBackupArchive,
$stryBackup,
$strOrder,
) =
logDebugParam
(
__PACKAGE__ . '->listByArchiveId', \@_,
{name => 'strArchiveId'},
{name => 'strPathBackupArchive'},
{name => 'stryBackup'},
{name => 'strOrder', default => 'forward'}
);
# List of backups associated with the db-id provided
my @stryArchiveBackup;
my $iDbHistoryId = $self->backupArchiveDbHistoryId($strArchiveId, $strPathBackupArchive);
# If history found, then build list of backups associated with the archive id passed, else return empty array
if (defined($iDbHistoryId))
{
# Iterate through the backups and filter
foreach my $strBackup (@$stryBackup)
{
# From the backup.info current backup section, get the db-id for the backup and if it is the same, add to the list
if ($self->test(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackup, INFO_BACKUP_KEY_HISTORY_ID, $iDbHistoryId))
{
if ($strOrder eq 'reverse')
{
unshift(@stryArchiveBackup, $strBackup)
}
else
{
push(@stryArchiveBackup, $strBackup)
}
}
}
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'stryArchiveBackup', value => \@stryArchiveBackup}
);
}
####################################################################################################################################
# last
#
@@ -643,6 +859,40 @@ sub dbHistoryIdGet
);
}
####################################################################################################################################
# dbHistoryList
#
# Get the data from the db history section.
####################################################################################################################################
sub dbHistoryList
{
my $self = shift;
my
(
$strOperation,
) = logDebugParam
(
__PACKAGE__ . '->dbHistoryList',
);
my %hDbHash;
foreach my $iHistoryId ($self->keys(INFO_BACKUP_SECTION_DB_HISTORY))
{
$hDbHash{$iHistoryId}{&INFO_DB_VERSION} =
$self->get(INFO_BACKUP_SECTION_DB_HISTORY, $iHistoryId, INFO_BACKUP_KEY_DB_VERSION);
$hDbHash{$iHistoryId}{&INFO_SYSTEM_ID} =
$self->get(INFO_BACKUP_SECTION_DB_HISTORY, $iHistoryId, INFO_BACKUP_KEY_SYSTEM_ID);
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'hDbHash', value => \%hDbHash}
);
}
####################################################################################################################################
# dbSectionSet
#

View File

@@ -197,7 +197,7 @@ sub backupInfoCheck
) =
logDebugParam
(
__PACKAGE__ . '->getBackupInfoCheck', \@_,
__PACKAGE__ . '->backupInfoCheck', \@_,
{name => 'oFile'},
{name => 'strDbVersion', required => false},
{name => 'iControlVersion', required => false},

View File

@@ -60,6 +60,9 @@ use constant CMD_RESTORE => 'restore'
use constant CMD_STANZA_CREATE => 'stanza-create';
push @EXPORT, qw(CMD_STANZA_CREATE);
$oCommandHash{&CMD_STANZA_CREATE} = true;
use constant CMD_STANZA_UPGRADE => 'stanza-upgrade';
push @EXPORT, qw(CMD_STANZA_UPGRADE);
$oCommandHash{&CMD_STANZA_UPGRADE} = true;
use constant CMD_START => 'start';
push @EXPORT, qw(CMD_START);
$oCommandHash{&CMD_START} = true;
@@ -611,6 +614,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true
}
@@ -670,6 +674,7 @@ my %oOptionRule =
&CMD_BACKUP => true,
&CMD_CHECK => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -730,6 +735,10 @@ my %oOptionRule =
{
&OPTION_RULE_REQUIRED => true
},
&CMD_STANZA_UPGRADE =>
{
&OPTION_RULE_REQUIRED => true
},
&CMD_START =>
{
&OPTION_RULE_REQUIRED => false
@@ -1012,6 +1021,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1033,6 +1043,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => false,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1069,6 +1080,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1090,6 +1102,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1110,6 +1123,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => false,
&CMD_STOP => false
}
@@ -1130,6 +1144,7 @@ my %oOptionRule =
&CMD_LOCAL => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
&CMD_EXPIRE => true,
@@ -1145,7 +1160,6 @@ my %oOptionRule =
{
&CMD_ARCHIVE_GET => true,
&CMD_ARCHIVE_PUSH => true,
&CMD_STANZA_CREATE => true,
&CMD_BACKUP => true,
&CMD_EXPIRE => true,
&CMD_INFO => true,
@@ -1153,6 +1167,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1175,6 +1190,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1191,6 +1207,7 @@ my %oOptionRule =
&CMD_ARCHIVE_PUSH => true,
&CMD_BACKUP => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
},
},
@@ -1212,6 +1229,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1243,6 +1261,7 @@ my %oOptionRule =
&CMD_REMOTE => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1306,6 +1325,7 @@ my %oOptionRule =
&CMD_INFO => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true
}
@@ -1336,6 +1356,7 @@ my %oOptionRule =
&CMD_INFO => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true
}
@@ -1478,6 +1499,7 @@ my %oOptionRule =
&CMD_LOCAL => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1502,6 +1524,7 @@ my %oOptionRule =
&CMD_LOCAL => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1527,6 +1550,7 @@ my %oOptionRule =
&CMD_LOCAL => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1542,6 +1566,7 @@ my %oOptionRule =
&CMD_BACKUP => true,
&CMD_CHECK => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
},
},
@@ -1789,6 +1814,7 @@ my %oOptionRule =
&CMD_EXPIRE => true,
&CMD_LOCAL => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1811,6 +1837,7 @@ my %oOptionRule =
&CMD_EXPIRE => true,
&CMD_LOCAL => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
},
@@ -1834,6 +1861,7 @@ my %oOptionRule =
&CMD_EXPIRE => true,
&CMD_LOCAL => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
&CMD_START => true,
&CMD_STOP => true,
}
@@ -1860,6 +1888,7 @@ my %oOptionRule =
&CMD_CHECK => true,
&CMD_RESTORE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
},
},
@@ -1875,6 +1904,7 @@ my %oOptionRule =
&CMD_CHECK => true,
&CMD_REMOTE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1891,6 +1921,7 @@ my %oOptionRule =
&CMD_LOCAL => true,
&CMD_REMOTE => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
}
},
@@ -1906,6 +1937,7 @@ my %oOptionRule =
&CMD_CHECK => true,
&CMD_LOCAL => true,
&CMD_STANZA_CREATE => true,
&CMD_STANZA_UPGRADE => true,
},
&OPTION_RULE_REQUIRED => false,
&OPTION_RULE_DEPEND =>

View File

@@ -1346,6 +1346,49 @@ my $oConfigHelpData =
}
},
# STANZA-UPGRADE Command Help
#---------------------------------------------------------------------------------------------------------------------------
'stanza-upgrade' =>
{
summary =>
"Upgrade a stanza.",
description =>
"Immediately after upgrading PostgreSQL to a newer major version, the db-path for all pgBackRest configurations " .
"must be set to the new database location and the stanza-upgrade run on the backup host. If the database is " .
"offline use the --no-online option.",
option =>
{
'backup-cmd' => 'section',
'backup-config' => 'section',
'backup-host' => 'section',
'backup-standby' => 'section',
'buffer-size' => 'section',
'cmd-ssh' => 'section',
'compress-level' => 'section',
'compress-level-network' => 'section',
'config' => 'default',
'db-cmd' => 'section',
'db-config' => 'section',
'db-host' => 'section',
'db-path' => 'section',
'db-port' => 'section',
'db-socket-path' => 'section',
'db-timeout' => 'section',
'db-user' => 'section',
'lock-path' => 'section',
'log-level-console' => 'section',
'log-level-file' => 'section',
'log-path' => 'section',
'neutral-umask' => 'section',
'online' => 'default',
'protocol-timeout' => 'section',
'repo-path' => 'section',
'repo-sync' => 'section',
'stanza' => 'default'
}
},
# START Command Help
#---------------------------------------------------------------------------------------------------------------------------
'start' =>

View File

@@ -16,11 +16,13 @@ use pgBackRest::Common::Exception;
use pgBackRest::Common::Log;
use pgBackRest::Archive::ArchiveCommon;
use pgBackRest::Archive::ArchiveGet;
use pgBackRest::Archive::ArchiveInfo;
use pgBackRest::BackupCommon;
use pgBackRest::BackupInfo;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
@@ -238,158 +240,237 @@ sub process
}
else
{
my @stryGlobalBackupRetention;
# Determine which backup type to use for archive retention (full, differential, incremental) and get a list of the
# remaining non-expired backups based on the type.
if ($strArchiveRetentionType eq BACKUP_TYPE_FULL)
{
@stryPath = $oBackupInfo->list(backupRegExpGet(true), 'reverse');
@stryGlobalBackupRetention = $oBackupInfo->list(backupRegExpGet(true), 'reverse');
}
elsif ($strArchiveRetentionType eq BACKUP_TYPE_DIFF)
{
@stryPath = $oBackupInfo->list(backupRegExpGet(true, true), 'reverse');
@stryGlobalBackupRetention = $oBackupInfo->list(backupRegExpGet(true, true), 'reverse');
}
elsif ($strArchiveRetentionType eq BACKUP_TYPE_INCR)
{
@stryPath = $oBackupInfo->list(backupRegExpGet(true, true, true), 'reverse');
@stryGlobalBackupRetention = $oBackupInfo->list(backupRegExpGet(true, true, true), 'reverse');
}
# If no backups were found then preserve current archive logs - too soon to expire them
my $iBackupTotal = scalar @stryPath;
my $iBackupTotal = scalar @stryGlobalBackupRetention;
if ($iBackupTotal > 0)
{
# See if enough backups exist for expiration to start
my $strArchiveRetentionBackup = $stryPath[$iArchiveRetention - 1];
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($oFile->pathGet(PATH_BACKUP_ARCHIVE), true);
my @stryListArchiveDisk = fileList($oFile->pathGet(PATH_BACKUP_ARCHIVE), REGEX_ARCHIVE_DIR_DB_VERSION, 'forward', true);
if (!defined($strArchiveRetentionBackup))
# Make sure the current database versions match between the two files
if (!($oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
($oBackupInfo->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION)))) ||
!($oArchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_SYSTEM_ID, undef,
($oBackupInfo->get(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_SYSTEM_ID)))))
{
if ($strArchiveRetentionType eq BACKUP_TYPE_FULL && scalar @stryPath > 0)
{
&log(INFO, "full backup total < ${iArchiveRetention} - using oldest full backup for archive retention");
$strArchiveRetentionBackup = $stryPath[scalar @stryPath - 1];
}
confess &log(ERROR, "archive and backup database versions do not match\n" .
"HINT: has a stanza-upgrade been performed?", ERROR_FILE_INVALID);
}
# If a backup has been selected for retention then continue
if (defined($strArchiveRetentionBackup))
# Get the list of backups that are part of archive retention
my @stryTmp = @stryGlobalBackupRetention;
my @stryGlobalBackupArchiveRetention = splice(@stryTmp, 0, $iArchiveRetention);
# For each archiveId, remove WAL that are not part of retention
foreach my $strArchiveId (@stryListArchiveDisk)
{
my $bRemove;
# From the global list of backups to retain, create a list of backups, oldest to newest, associated with this
# archiveId (e.g. 9.4-1)
my @stryLocalBackupRetention = $oBackupInfo->listByArchiveId($strArchiveId,
$oFile->pathGet(PATH_BACKUP_ARCHIVE), \@stryGlobalBackupRetention, 'reverse');
# Only expire if the selected backup has archive info - backups performed with --no-online will
# not have archive info and cannot be used for expiration.
if ($oBackupInfo->test(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strArchiveRetentionBackup, INFO_BACKUP_KEY_ARCHIVE_START))
# If no backup to retain was found
if (!@stryLocalBackupRetention)
{
# Get archive id
my $strArchiveId = new pgBackRest::Archive::ArchiveGet()->getArchiveId($oFile);
# Get the backup db-id corresponding to this archiveId
my $iDbHistoryId = $oBackupInfo->backupArchiveDbHistoryId($strArchiveId, $oFile->pathGet(PATH_BACKUP_ARCHIVE));
# Get archive ranges to preserve. Because archive retention can be less than total retention it is important
# to preserve archive that is required to make the older backups consistent even though they cannot be played
# any further forward with PITR.
my $strArchiveExpireMax;
my @oyArchiveRange;
foreach my $strBackup ($oBackupInfo->list())
# If this is not the current database, then delete the archive directory else do nothing since the current
# DB archive directory must not be deleted
if (!defined($iDbHistoryId) || !$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_HISTORY_ID, undef,
$iDbHistoryId))
{
if ($strBackup le $strArchiveRetentionBackup &&
$oBackupInfo->test(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackup, INFO_BACKUP_KEY_ARCHIVE_START))
{
my $oArchiveRange = {};
my $strFullPath = $oFile->pathGet(PATH_BACKUP_ARCHIVE, $strArchiveId);
$$oArchiveRange{start} = $oBackupInfo->get(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strBackup, INFO_BACKUP_KEY_ARCHIVE_START);
remove_tree($strFullPath) > 0
or confess &log(ERROR, "unable to remove orphaned ${strFullPath}", ERROR_PATH_REMOVE);
if ($strBackup ne $strArchiveRetentionBackup)
{
$$oArchiveRange{stop} = $oBackupInfo->get(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strBackup, INFO_BACKUP_KEY_ARCHIVE_STOP);
}
else
{
$strArchiveExpireMax = $$oArchiveRange{start};
}
&log(DETAIL, "archive retention on backup ${strBackup}, start = $$oArchiveRange{start}" .
(defined($$oArchiveRange{stop}) ? ", stop = $$oArchiveRange{stop}" : ''));
push(@oyArchiveRange, $oArchiveRange);
}
&log(INFO, "removed orphaned archive path: ${strFullPath}");
}
# Get all major archive paths (timeline and first 64 bits of LSN)
foreach my $strPath ($oFile->list(PATH_BACKUP_ARCHIVE, $strArchiveId, REGEX_ARCHIVE_DIR_WAL))
{
logDebugMisc($strOperation, "found major WAL path: ${strPath}");
$bRemove = true;
# Continue to next directory
next;
}
# Keep the path if it falls in the range of any backup in retention
foreach my $oArchiveRange (@oyArchiveRange)
my @stryLocalBackupArchiveRentention;
# If the archive retention is less than or equal to the number of all backups, then perform selective expiration
if (@stryGlobalBackupArchiveRetention && $iArchiveRetention <= scalar @stryGlobalBackupRetention)
{
# From the full list of backups in archive retention, find the intersection of local backups to retain
foreach my $strGlobalBackupArchiveRetention (@stryGlobalBackupArchiveRetention)
{
foreach my $strLocalBackupRetention (@stryLocalBackupRetention)
{
if ($strPath ge substr($$oArchiveRange{start}, 0, 16) &&
(!defined($$oArchiveRange{stop}) || $strPath le substr($$oArchiveRange{stop}, 0, 16)))
if ($strLocalBackupRetention eq $strGlobalBackupArchiveRetention)
{
$bRemove = false;
last;
unshift(@stryLocalBackupArchiveRentention, $strLocalBackupRetention);
}
}
}
}
# Else if there are not enough backups yet globally to start archive expiration then set the archive retention
# to the oldest backup so anything prior to that will be removed as it is not needed but everything else is
# This is incase there are old archives left around so that they don't stay around forever
else
{
if ($strArchiveRetentionType eq BACKUP_TYPE_FULL && scalar @stryLocalBackupRetention > 0)
{
&log(INFO, "full backup total < ${iArchiveRetention} - using oldest full backup for ${strArchiveId} " .
" archive retention");
$stryLocalBackupArchiveRentention[0] = $stryLocalBackupRetention[0];
}
}
# Remove the entire directory if all archive is expired
if ($bRemove)
# If no local backups were found as part of retention then set the backup archive retention to the newest backup
# so that the database is fully recoverable (can be recovered from the last backup through pitr)
if (!@stryLocalBackupArchiveRentention)
{
$stryLocalBackupArchiveRentention[0] = $stryLocalBackupRetention[-1];
}
my $strArchiveRetentionBackup = $stryLocalBackupArchiveRentention[0];
# If a backup has been selected for retention then continue
if (defined($strArchiveRetentionBackup))
{
my $bRemove;
# Only expire if the selected backup has archive info - backups performed with --no-online will
# not have archive info and cannot be used for expiration.
if ($oBackupInfo->test(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strArchiveRetentionBackup, INFO_BACKUP_KEY_ARCHIVE_START))
{
# Get archive ranges to preserve. Because archive retention can be less than total retention it is
# important to preserve archive that is required to make the older backups consistent even though they
# cannot be played any further forward with PITR.
my $strArchiveExpireMax;
my @oyArchiveRange;
my @stryBackupList = $oBackupInfo->list();
# With the full list of backups, loop through only those associated with this archiveId
foreach my $strBackup ($oBackupInfo->listByArchiveId($strArchiveId,
$oFile->pathGet(PATH_BACKUP_ARCHIVE), \@stryBackupList))
{
my $strFullPath = $oFile->pathGet(PATH_BACKUP_ARCHIVE, $strArchiveId) . "/${strPath}";
remove_tree($strFullPath) > 0
or confess &log(ERROR, "unable to remove ${strFullPath}", ERROR_PATH_REMOVE);
# Log expire info
logDebugMisc($strOperation, "remove major WAL path: ${strFullPath}");
$self->logExpire($strPath);
}
# Else delete individual files instead if the major path is less than or equal to the most recent retention
# backup. This optimization prevents scanning though major paths that could not possibly have anything to
# expire.
elsif ($strPath le substr($strArchiveExpireMax, 0, 16))
{
# Look for files in the archive directory
foreach my $strSubPath ($oFile->list(PATH_BACKUP_ARCHIVE,
"${strArchiveId}/${strPath}", "^[0-F]{24}.*\$"))
if ($strBackup le $strArchiveRetentionBackup &&
$oBackupInfo->test(INFO_BACKUP_SECTION_BACKUP_CURRENT, $strBackup, INFO_BACKUP_KEY_ARCHIVE_START))
{
$bRemove = true;
my $oArchiveRange = {};
# Determine if the individual archive log is used in a backup
foreach my $oArchiveRange (@oyArchiveRange)
$$oArchiveRange{start} = $oBackupInfo->get(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strBackup, INFO_BACKUP_KEY_ARCHIVE_START);
if ($strBackup ne $strArchiveRetentionBackup)
{
if (substr($strSubPath, 0, 24) ge $$oArchiveRange{start} &&
(!defined($$oArchiveRange{stop}) || substr($strSubPath, 0, 24) le $$oArchiveRange{stop}))
{
$bRemove = false;
last;
}
}
# Remove archive log if it is not used in a backup
if ($bRemove)
{
fileRemove($oFile->pathGet(PATH_BACKUP_ARCHIVE, "${strArchiveId}/${strSubPath}"));
logDebugMisc($strOperation, "remove WAL segment: ${strSubPath}");
# Log expire info
$self->logExpire(substr($strSubPath, 0, 24));
$$oArchiveRange{stop} = $oBackupInfo->get(INFO_BACKUP_SECTION_BACKUP_CURRENT,
$strBackup, INFO_BACKUP_KEY_ARCHIVE_STOP);
}
else
{
# Log that the file was not expired
$self->logExpire();
$strArchiveExpireMax = $$oArchiveRange{start};
}
&log(DETAIL, "archive retention on backup ${strBackup}, archiveId = ${strArchiveId}, " .
"start = $$oArchiveRange{start}" .
(defined($$oArchiveRange{stop}) ? ", stop = $$oArchiveRange{stop}" : ''));
push(@oyArchiveRange, $oArchiveRange);
}
}
# Get all major archive paths (timeline and first 32 bits of LSN)
foreach my $strPath ($oFile->list(PATH_BACKUP_ARCHIVE, $strArchiveId, REGEX_ARCHIVE_DIR_WAL))
{
logDebugMisc($strOperation, "found major WAL path: ${strPath}");
$bRemove = true;
# Keep the path if it falls in the range of any backup in retention
foreach my $oArchiveRange (@oyArchiveRange)
{
if ($strPath ge substr($$oArchiveRange{start}, 0, 16) &&
(!defined($$oArchiveRange{stop}) || $strPath le substr($$oArchiveRange{stop}, 0, 16)))
{
$bRemove = false;
last;
}
}
# Remove the entire directory if all archive is expired
if ($bRemove)
{
my $strFullPath = $oFile->pathGet(PATH_BACKUP_ARCHIVE, $strArchiveId) . "/${strPath}";
remove_tree($strFullPath) > 0
or confess &log(ERROR, "unable to remove ${strFullPath}", ERROR_PATH_REMOVE);
# Log expire info
logDebugMisc($strOperation, "remove major WAL path: ${strFullPath}");
$self->logExpire($strPath);
}
# Else delete individual files instead if the major path is less than or equal to the most recent
# retention backup. This optimization prevents scanning though major paths that could not possibly
# have anything to expire.
elsif ($strPath le substr($strArchiveExpireMax, 0, 16))
{
# Look for files in the archive directory
foreach my $strSubPath ($oFile->list(PATH_BACKUP_ARCHIVE,
"${strArchiveId}/${strPath}", "^[0-F]{24}.*\$"))
{
$bRemove = true;
# Determine if the individual archive log is used in a backup
foreach my $oArchiveRange (@oyArchiveRange)
{
if (substr($strSubPath, 0, 24) ge $$oArchiveRange{start} &&
(!defined($$oArchiveRange{stop}) || substr($strSubPath, 0, 24) le $$oArchiveRange{stop}))
{
$bRemove = false;
last;
}
}
# Remove archive log if it is not used in a backup
if ($bRemove)
{
fileRemove($oFile->pathGet(PATH_BACKUP_ARCHIVE, "${strArchiveId}/${strSubPath}"));
logDebugMisc($strOperation, "remove WAL segment: ${strSubPath}");
# Log expire info
$self->logExpire(substr($strSubPath, 0, 24));
}
else
{
# Log that the file was not expired
$self->logExpire();
}
}
}
}
}
# Log if no archive was expired
if ($self->{iArchiveExpireTotal} == 0)
{
&log(DETAIL, 'no archive to remove');
# Log if no archive was expired
if ($self->{iArchiveExpireTotal} == 0)
{
&log(DETAIL, 'no archive to remove');
}
}
}
}

View File

@@ -19,6 +19,7 @@ use pgBackRest::BackupInfo;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
@@ -49,7 +50,7 @@ use constant INFO_STANZA_STATUS_NO_BACKUP_MESSAGE => 'no valid
use constant INFO_KEY_CODE => 'code';
use constant INFO_KEY_DELTA => 'delta';
use constant INFO_KEY_FORMAT => 'format';
use constant INFO_KEY_ID => 'id';
use constant INFO_KEY_ID => INFO_HISTORY_ID;
use constant INFO_KEY_LABEL => 'label';
use constant INFO_KEY_MAX => 'max';
use constant INFO_KEY_MIN => 'min';
@@ -59,9 +60,9 @@ use constant INFO_KEY_REFERENCE => 'referenc
use constant INFO_KEY_SIZE => 'size';
use constant INFO_KEY_START => 'start';
use constant INFO_KEY_STOP => 'stop';
use constant INFO_KEY_SYSTEM_ID => 'system-id';
use constant INFO_KEY_SYSTEM_ID => INFO_SYSTEM_ID;
use constant INFO_KEY_TYPE => 'type';
use constant INFO_KEY_VERSION => 'version';
use constant INFO_KEY_VERSION => INFO_DB_VERSION;
####################################################################################################################################
# CONSTRUCTOR
@@ -487,10 +488,10 @@ sub backupList
{
my $oDbHash =
{
&INFO_KEY_ID => $iHistoryId,
&INFO_KEY_VERSION =>
&INFO_HISTORY_ID => $iHistoryId,
&INFO_DB_VERSION =>
$oBackupInfo->get(INFO_BACKUP_SECTION_DB_HISTORY, $iHistoryId, INFO_BACKUP_KEY_DB_VERSION),
&INFO_KEY_SYSTEM_ID =>
&INFO_SYSTEM_ID =>
$oBackupInfo->get(INFO_BACKUP_SECTION_DB_HISTORY, $iHistoryId, INFO_BACKUP_KEY_SYSTEM_ID)
};

View File

@@ -0,0 +1,32 @@
####################################################################################################################################
# INFO MODULE
# Constants, variables and functions common to the info files
####################################################################################################################################
package pgBackRest::InfoCommon;
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use Exporter qw(import);
our @EXPORT = qw();
####################################################################################################################################
# DB section constants
####################################################################################################################################
use constant INFO_BACKUP_SECTION_DB => 'db';
push @EXPORT, qw(INFO_BACKUP_SECTION_DB);
use constant INFO_BACKUP_SECTION_DB_HISTORY => INFO_BACKUP_SECTION_DB . ':history';
push @EXPORT, qw(INFO_BACKUP_SECTION_DB_HISTORY);
####################################################################################################################################
# History section constants
####################################################################################################################################
use constant INFO_HISTORY_ID => 'id';
push @EXPORT, qw(INFO_HISTORY_ID);
use constant INFO_DB_VERSION => 'version';
push @EXPORT, qw(INFO_DB_VERSION);
use constant INFO_SYSTEM_ID => 'system-id';
push @EXPORT, qw(INFO_SYSTEM_ID);
1;

View File

@@ -22,6 +22,7 @@ use pgBackRest::Db;
use pgBackRest::DbVersion;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
@@ -47,6 +48,7 @@ sub new
# Initialize the database object
$self->{oDb} = dbMasterGet();
$self->dbInfoGet();
# Return from function and log return values if any
return logDebugReturn
@@ -56,22 +58,6 @@ sub new
);
}
####################################################################################################################################
# DESTROY
####################################################################################################################################
sub DESTROY
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->DESTROY');
undef($self->{oDb});
# Return from function and log return values if any
return logDebugReturn($strOperation);
}
####################################################################################################################################
# Process Stanza Commands
####################################################################################################################################
@@ -82,14 +68,23 @@ sub process
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->process');
# Error if any other command other than stanza-create is found
if (!commandTest(CMD_STANZA_CREATE))
{
confess &log(ASSERT, "Stanza->process() called with invalid command: " . commandGet());
}
my $iResult = 0;
# Process stanza create
my $iResult = $self->stanzaCreate();
if (commandTest(CMD_STANZA_CREATE))
{
$iResult = $self->stanzaCreate();
}
# Process stanza upgrade
elsif (commandTest(CMD_STANZA_UPGRADE))
{
$iResult = $self->stanzaUpgrade();
}
# Else error if any other command is found
else
{
confess &log(ASSERT, "stanza->process() called with invalid command: " . commandGet());
}
# Return from function and log return values if any
return logDebugReturn
@@ -119,8 +114,6 @@ sub stanzaCreate
protocolGet(NONE)
);
$self->dbInfoGet();
# Get the parent paths (create if not exist)
my $strParentPathArchive = $self->parentPathGet($oFile, PATH_BACKUP_ARCHIVE);
my $strParentPathBackup = $self->parentPathGet($oFile, PATH_BACKUP_CLUSTER);
@@ -174,6 +167,76 @@ sub stanzaCreate
);
}
####################################################################################################################################
# stanzaUpgrade
#
# Updates stanza information to reflect new cluster information. Normally used for version upgrades, but could be used after a
# cluster has been dumped and restored to the same version.
####################################################################################################################################
sub stanzaUpgrade
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my ($strOperation) = logDebugParam(__PACKAGE__ . '->stanzaUpgrade');
# Initialize default file object with protocol set to NONE meaning strictly local
my $oFile = new pgBackRest::File
(
optionGet(OPTION_STANZA),
optionGet(OPTION_REPO_PATH),
protocolGet(NONE)
);
# Get the archive info and backup info files; if either does not exist an error will be thrown
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($oFile->pathGet(PATH_BACKUP_ARCHIVE));
my $oBackupInfo = new pgBackRest::BackupInfo($oFile->pathGet(PATH_BACKUP_CLUSTER));
my $bBackupUpgraded = false;
my $bArchiveUpgraded = false;
# If the DB section does not match, then upgrade
if ($self->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_BACKUP_MISMATCH))
{
# Determine if it is necessary to reconstruct the file
my ($bReconstruct, $strWarningMsgArchive) =
$self->reconstructCheck($oBackupInfo, PATH_BACKUP_CLUSTER, $oFile, $oFile->pathGet(PATH_BACKUP_CLUSTER));
# If reconstruction was required then save the reconstructed file
if ($bReconstruct)
{
$oBackupInfo->save();
$bBackupUpgraded = true;
}
}
if ($self->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ARCHIVE_MISMATCH))
{
# Determine if it is necessary to reconstruct the file
my ($bReconstruct, $strWarningMsgArchive) =
$self->reconstructCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, $oFile, $oFile->pathGet(PATH_BACKUP_ARCHIVE));
# If reconstruction was required then save the reconstructed file
if ($bReconstruct)
{
$oArchiveInfo->save();
$bArchiveUpgraded = true;
}
}
# If neither file needed upgrading then provide informational message that an upgrade was not necessary
if (!($bBackupUpgraded || $bArchiveUpgraded))
{
&log(INFO, "the stanza data is already up to date");
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'iResult', value => 0, trace => true}
);
}
####################################################################################################################################
# parentPathGet
#
@@ -246,84 +309,40 @@ sub infoFileCreate
my $iResult = 0;
my $strResultMessage = undef;
my $strWarningMsgArchive = undef;
my $bSave = true;
my $bReconstruct = true;
# If force was not used and the info file does not exist and the directory is not empty, then error
# This should also be performed by the calling routine before this function is called, so this is just a safety check
if (!optionGet(OPTION_FORCE) && !$oInfo->{bExists} && @$stryFileList)
{
confess &log(ERROR, ($strPathType eq PATH_BACKUP_CLUSTER ? 'backup directory ' : 'archive directory ') .
$strStanzaCreateErrorMsg, ERROR_PATH_NOT_EMPTY);
}
# Turn off console logging to control when to display the error
logLevelSet(undef, OFF);
logDisable();
eval
{
# ??? File init will need to be addressed with stanza-upgrade since there could then be more than one DB and db-id
# so the DB section, esp for backup.info, cannot be initialized before we attempt to reconstruct the file from the
# directories since the history id would be wrong. Also need to handle if the reconstruction fails - if any file in
# the backup directory or archive directory are missing or mal-formed, then currently an error will be thrown, which
# may not be desireable.
($bReconstruct, $strWarningMsgArchive) = $self->reconstructCheck($oInfo, $strPathType, $oFile, $strParentPath);
# If the info file does not exist, initialize it internally but do not save until complete reconstruction
if (!$oInfo->{bExists})
if ($oInfo->{bExists} && $bReconstruct)
{
($strPathType eq PATH_BACKUP_CLUSTER)
? $oInfo->create($self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId}, $self->{oDb}{iControlVersion},
$self->{oDb}{iCatalogVersion}, false)
: $oInfo->create($self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId}, false);
}
# Reconstruct the file from the data in the directory if there is any
if ($strPathType eq PATH_BACKUP_CLUSTER)
{
$oInfo->reconstruct(false, false);
}
# If this is the archive.info reconstruction then catch any warnings
else
{
$strWarningMsgArchive = $oInfo->reconstruct($oFile, $self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId});
}
# If the file exists on disk, then check if the reconstructed data is the same as what is on disk
if ($oInfo->{bExists})
{
my $oInfoOnDisk =
($strPathType eq PATH_BACKUP_CLUSTER ? new pgBackRest::BackupInfo($strParentPath)
: new pgBackRest::Archive::ArchiveInfo($strParentPath));
# If force was not used and the hashes are different then error
if ($oInfoOnDisk->hash() ne $oInfo->hash())
if (!optionGet(OPTION_FORCE))
{
if (!optionGet(OPTION_FORCE))
{
$iResult = ERROR_FILE_INVALID;
$strResultMessage =
($strPathType eq PATH_BACKUP_CLUSTER ? 'backup file ' : 'archive file ') .
' invalid; to correct, use --force';
}
$iResult = ERROR_FILE_INVALID;
$strResultMessage =
($strPathType eq PATH_BACKUP_CLUSTER ? 'backup file ' : 'archive file ') . "invalid\n" .
'HINT: use stanza-upgrade if the database has been upgraded or use --force';
}
# If the hashes are the same, then don't save the file since it already exists and is valid
else
{
$bSave = false;
}
}
# If force was not used and the info file does not exist and the directory is not empty, then error
# This should also be performed by the calling routine before this function is called, so this is just a safety check
if ($iResult == 0 && !optionGet(OPTION_FORCE) && !$oInfo->{bExists} && @$stryFileList)
{
$iResult = ERROR_PATH_NOT_EMPTY;
$strResultMessage =
($strPathType eq PATH_BACKUP_CLUSTER ? 'backup directory ' : 'archive directory ') . $strStanzaCreateErrorMsg;
}
if ($iResult == 0)
{
# ??? With stanza-upgrade we will want ability to force the DB section to match but for now, if it doesn't match,
# then something is wrong.
($strPathType eq PATH_BACKUP_CLUSTER)
? $oInfo->check($self->{oDb}{strDbVersion}, $self->{oDb}{iControlVersion}, $self->{oDb}{iCatalogVersion},
$self->{oDb}{ullDbSysId}, false)
: $oInfo->check($self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId}, false);
# Save the reconstructed file
if ($bSave)
if ($bReconstruct)
{
$oInfo->save();
}
@@ -337,18 +356,18 @@ sub infoFileCreate
}
}
# Reset the console logging
logEnable();
return true;
}
or do
{
# Capture error information
# Reset console logging and capture error information
logEnable();
$iResult = exceptionCode($EVAL_ERROR);
$strResultMessage = exceptionMessage($EVAL_ERROR->message());
};
# Reset the console logging
logLevelSet(undef, optionGet(OPTION_LOG_LEVEL_CONSOLE));
# If a warning was issued, raise it
if (defined($strWarningMsgArchive))
{
@@ -392,4 +411,131 @@ sub dbInfoGet
return logDebugReturn($strOperation);
}
####################################################################################################################################
# reconstructCheck
#
# Reconstruct the file based on disk data. If the info file already exists, it compares the reconstructed file to the existing file
# and indicates if reconstruction is required. If the file does not yet exist on disk, it will still indicate reconstruction is
# needed. The oInfo object contains the reconstructed data and can be saved by the calling routine.
####################################################################################################################################
sub reconstructCheck
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$oInfo,
$strPathType,
$oFile,
$strParentPath,
) =
logDebugParam
(
__PACKAGE__ . '->reconstructCheck', \@_,
{name => 'oInfo'},
{name => 'strPathType'},
{name => 'oFile'},
{name => 'strParentPath'},
);
my $bReconstruct = true;
my $strWarningMsgArchive = undef;
# Reconstruct the file from the data in the directory if there is any else initialize the file
if ($strPathType eq PATH_BACKUP_CLUSTER)
{
$oInfo->reconstruct(false, false, $self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId}, $self->{oDb}{iControlVersion},
$self->{oDb}{iCatalogVersion});
}
# If this is the archive.info reconstruction then catch any warnings
else
{
$strWarningMsgArchive = $oInfo->reconstruct($oFile, $self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId});
}
# If the file exists on disk, then check if the reconstructed data is the same as what is on disk
if ($oInfo->{bExists})
{
my $oInfoOnDisk =
($strPathType eq PATH_BACKUP_CLUSTER ? new pgBackRest::BackupInfo($strParentPath)
: new pgBackRest::Archive::ArchiveInfo($strParentPath));
# If the hashes are the same, then no need to reconstruct the file since it already exists and is valid
if ($oInfoOnDisk->hash() eq $oInfo->hash())
{
$bReconstruct = false;
}
}
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'bReconstruct', value => $bReconstruct},
{name => 'strWarningMsgArchive', value => $strWarningMsgArchive},
);
}
####################################################################################################################################
# upgradeCheck
#
# Checks the info file to see if an upgrade is necessary.
####################################################################################################################################
sub upgradeCheck
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$oInfo,
$strPathType,
$iExpectedError,
) =
logDebugParam
(
__PACKAGE__ . '->upgradeCheck', \@_,
{name => 'oInfo'},
{name => 'strPathType'},
{name => 'iExpectedError'},
);
my $iResult = 0;
my $strResultMessage = undef;
# Turn off console logging to control when to display the error
logDisable();
eval
{
($strPathType eq PATH_BACKUP_CLUSTER)
? $oInfo->check($self->{oDb}{strDbVersion}, $self->{oDb}{iControlVersion}, $self->{oDb}{iCatalogVersion},
$self->{oDb}{ullDbSysId}, true)
: $oInfo->check($self->{oDb}{strDbVersion}, $self->{oDb}{ullDbSysId}, true);
logEnable();
return true;
}
or do
{
logEnable();
# Confess unhandled errors
confess $EVAL_ERROR if (exceptionCode($EVAL_ERROR) != $iExpectedError);
# Capture the result which will be the expected error, meaning an upgrade is needed
$iResult = exceptionCode($EVAL_ERROR);
$strResultMessage = exceptionMessage($EVAL_ERROR->message());
};
# Return from function and log return values if any
return logDebugReturn
(
$strOperation,
{name => 'bResult', value => ($iResult == $iExpectedError ? true : false)},
);
}
1;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -17,14 +17,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-1]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000006","backup-archive-stop":"0000000100000000000000FB","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-1]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -300,7 +300,7 @@ Nothing to expire
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config="[TEST_PATH]/db-master/pgbackrest.conf" --stanza=db --log-level-console=detail --retention-full=1 --retention-diff=1 --retention-archive-type=full --retention-archive=1 expire
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=1 --retention-archive-type=full --retention-diff=1 --retention-full=1 --stanza=db
P00 DETAIL: archive retention on backup [BACKUP-FULL-1], start = 000000010000000000000000
P00 DETAIL: archive retention on backup [BACKUP-FULL-1], archiveId = 9.2-1, start = 000000010000000000000000
P00 DETAIL: no archive to remove
P00 INFO: expire command end: completed successfully
@@ -316,14 +316,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-1]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000000000006","backup-archive-stop":"0000000100000000000000FB","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-1]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -611,14 +611,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000100000000","backup-archive-stop":"000000010000000100000002","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -907,7 +907,7 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 INFO: expire full backup set: [BACKUP-FULL-1], [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-INCR-1]
P00 INFO: remove expired backup [BACKUP-FULL-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], start = 000000010000000100000000
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 000000010000000100000000
P00 DETAIL: remove archive: start = 0000000100000000, stop = 0000000100000000
P00 INFO: expire command end: completed successfully
@@ -922,14 +922,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000100000000","backup-archive-stop":"000000010000000100000002","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -968,14 +968,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000010000000C","backup-archive-stop":"00000001000000020000000C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-1]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -1273,7 +1273,7 @@ Expire oldest full backup
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=1 --retention-archive-type=full --retention-diff=1 --retention-full=1 --stanza=db
P00 INFO: expire diff backup [BACKUP-DIFF-1]
P00 INFO: remove expired backup [BACKUP-DIFF-1]
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], start = 000000010000000100000000
P00 DETAIL: archive retention on backup [BACKUP-FULL-2], archiveId = 9.2-1, start = 000000010000000100000000
P00 DETAIL: no archive to remove
P00 INFO: expire command end: completed successfully
@@ -1289,14 +1289,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000010000000C","backup-archive-stop":"00000001000000020000000C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-1]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -1607,14 +1607,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000001A","backup-archive-stop":"00000001000000020000001C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-3]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -1929,8 +1929,8 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 INFO: expire full backup set: [BACKUP-FULL-2], [BACKUP-DIFF-2]
P00 INFO: remove expired backup [BACKUP-DIFF-2]
P00 INFO: remove expired backup [BACKUP-FULL-2]
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-3], start = 000000010000000200000016
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-3], archiveId = 9.2-1, start = 000000010000000200000016
P00 DETAIL: remove archive: start = 0000000100000001, stop = 00000001000000020000000F
P00 DETAIL: remove archive: start = 000000010000000200000013, stop = 000000010000000200000015
P00 INFO: expire command end: completed successfully
@@ -1948,14 +1948,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-2]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000001A","backup-archive-stop":"00000001000000020000001C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-3]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2001,14 +2001,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000001E","backup-archive-stop":"000000010000000200000020","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-INCR-2]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2051,8 +2051,8 @@ P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-mas
P00 INFO: expire diff backup set: [BACKUP-DIFF-3], [BACKUP-INCR-2]
P00 INFO: remove expired backup [BACKUP-INCR-2]
P00 INFO: remove expired backup [BACKUP-DIFF-3]
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], start = 00000001000000020000001E
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], archiveId = 9.2-1, start = 00000001000000020000001E
P00 DETAIL: remove archive: start = 000000010000000200000016, stop = 00000001000000020000001D
P00 INFO: expire command end: completed successfully
@@ -2068,14 +2068,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000001E","backup-archive-stop":"000000010000000200000020","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-INCR-2]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2117,14 +2117,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-3]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000024","backup-archive-stop":"000000010000000200000026","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-4]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2161,9 +2161,9 @@ Expire archive based on newest incr backup
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config="[TEST_PATH]/db-master/pgbackrest.conf" --stanza=db --log-level-console=detail --retention-full=1 --retention-diff=1 --retention-archive-type=incr --retention-archive=1 expire
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=1 --retention-archive-type=incr --retention-diff=1 --retention-full=1 --stanza=db
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], start = 00000001000000020000001E, stop = 000000010000000200000020
P00 DETAIL: archive retention on backup [BACKUP-INCR-3], start = 000000010000000200000024
P00 DETAIL: archive retention on backup [BACKUP-FULL-3], archiveId = 9.2-1, start = 000000010000000200000010, stop = 000000010000000200000012
P00 DETAIL: archive retention on backup [BACKUP-DIFF-4], archiveId = 9.2-1, start = 00000001000000020000001E, stop = 000000010000000200000020
P00 DETAIL: archive retention on backup [BACKUP-INCR-3], archiveId = 9.2-1, start = 000000010000000200000024
P00 DETAIL: remove archive: start = 000000010000000200000021, stop = 000000010000000200000023
P00 INFO: expire command end: completed successfully
@@ -2180,14 +2180,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-3]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000024","backup-archive-stop":"000000010000000200000026","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-4]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2238,14 +2238,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-5]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000036","backup-archive-stop":"000000010000000200000038","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2306,8 +2306,8 @@ P00 INFO: remove expired backup [BACKUP-DIFF-5]
P00 INFO: remove expired backup [BACKUP-INCR-3]
P00 INFO: remove expired backup [BACKUP-DIFF-4]
P00 INFO: remove expired backup [BACKUP-FULL-3]
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], start = 000000010000000200000036
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.2-1, start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.2-1, start = 000000010000000200000036
P00 DETAIL: remove archive: start = 000000010000000200000010, stop = 000000010000000200000029
P00 DETAIL: remove archive: start = 00000001000000020000002D, stop = 000000010000000200000035
P00 INFO: expire command end: completed successfully
@@ -2324,14 +2324,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-5]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000036","backup-archive-stop":"000000010000000200000038","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2377,14 +2377,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-7]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000048","backup-archive-stop":"00000001000000020000004A","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-6]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2439,11 +2439,11 @@ P00 WARN: option retention-full is not set, the repository may run out of spac
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
P00 WARN: option 'retention-diff' is not set for 'retention-archive-type=diff'
HINT: to retain differential backups indefinitely (without warning), set option 'retention-diff' to the maximum.
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], start = 000000010000000200000036, stop = 000000010000000200000038
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], start = 00000001000000020000003C, stop = 00000001000000020000003E
P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], start = 000000010000000200000042, stop = 000000010000000200000044
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], start = 000000010000000200000048
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.2-1, start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.2-1, start = 000000010000000200000036, stop = 000000010000000200000038
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], archiveId = 9.2-1, start = 00000001000000020000003C, stop = 00000001000000020000003E
P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], archiveId = 9.2-1, start = 000000010000000200000042, stop = 000000010000000200000044
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], archiveId = 9.2-1, start = 000000010000000200000048
P00 DETAIL: remove archive: start = 000000010000000200000039, stop = 00000001000000020000003B
P00 DETAIL: remove archive: start = 00000001000000020000003F, stop = 000000010000000200000041
P00 DETAIL: remove archive: start = 000000010000000200000045, stop = 000000010000000200000047
@@ -2464,14 +2464,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-7]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000048","backup-archive-stop":"00000001000000020000004A","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-6]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2530,14 +2530,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000054","backup-archive-stop":"000000010000000200000056","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2595,13 +2595,13 @@ Expire full with retention-archive with warning retention-full not set
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=1 --retention-archive-type=full --stanza=db
P00 WARN: option retention-full is not set, the repository may run out of space
HINT: to retain full backups indefinitely (without warning), set option 'retention-full' to the maximum.
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], start = 000000010000000200000036, stop = 000000010000000200000038
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], start = 00000001000000020000003C, stop = 00000001000000020000003E
P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], start = 000000010000000200000042, stop = 000000010000000200000044
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], start = 000000010000000200000048, stop = 00000001000000020000004A
P00 DETAIL: archive retention on backup [BACKUP-FULL-7], start = 00000001000000020000004E, stop = 000000010000000200000050
P00 DETAIL: archive retention on backup [BACKUP-FULL-8], start = 000000010000000200000054
P00 DETAIL: archive retention on backup [BACKUP-FULL-4], archiveId = 9.2-1, start = 00000001000000020000002A, stop = 00000001000000020000002C
P00 DETAIL: archive retention on backup [BACKUP-FULL-5], archiveId = 9.2-1, start = 000000010000000200000036, stop = 000000010000000200000038
P00 DETAIL: archive retention on backup [BACKUP-FULL-6], archiveId = 9.2-1, start = 00000001000000020000003C, stop = 00000001000000020000003E
P00 DETAIL: archive retention on backup [BACKUP-DIFF-6], archiveId = 9.2-1, start = 000000010000000200000042, stop = 000000010000000200000044
P00 DETAIL: archive retention on backup [BACKUP-DIFF-7], archiveId = 9.2-1, start = 000000010000000200000048, stop = 00000001000000020000004A
P00 DETAIL: archive retention on backup [BACKUP-FULL-7], archiveId = 9.2-1, start = 00000001000000020000004E, stop = 000000010000000200000050
P00 DETAIL: archive retention on backup [BACKUP-FULL-8], archiveId = 9.2-1, start = 000000010000000200000054
P00 DETAIL: remove archive: start = 00000001000000020000004B, stop = 00000001000000020000004D
P00 DETAIL: remove archive: start = 000000010000000200000051, stop = 000000010000000200000053
P00 INFO: expire command end: completed successfully
@@ -2623,14 +2623,14 @@ backrest-version="[VERSION-1]"
[BACKUP-FULL-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000054","backup-archive-stop":"000000010000000200000056","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2697,14 +2697,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000005A","backup-archive-stop":"00000001000000020000005C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2787,14 +2787,14 @@ backrest-version="[VERSION-1]"
[BACKUP-INCR-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000005A","backup-archive-stop":"00000001000000020000005C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2861,14 +2861,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000006C","backup-archive-stop":"00000001000000020000006E","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -2961,14 +2961,14 @@ backrest-version="[VERSION-1]"
[BACKUP-DIFF-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000006C","backup-archive-stop":"00000001000000020000006E","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=20920101
db-control-version=921
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=920000000000000001
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":20920101,"db-control-version":921,"db-system-id":920000000000000001,"db-version":"9.2"}
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
@@ -3035,3 +3035,174 @@ db-version="9.2"
00000001000000020000006F-0000000000000000000000000000000000000000.gz
000000010000000200000070-0000000000000000000000000000000000000000
000000010000000200000071-0000000000000000000000000000000000000000.gz
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[backup:current]
[BACKUP-FULL-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000054","backup-archive-stop":"000000010000000200000056","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-INCR-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000005A","backup-archive-stop":"00000001000000020000005C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-FULL-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000060","backup-archive-stop":"000000010000000200000062","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-DIFF-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000066","backup-archive-stop":"000000010000000200000068","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-9]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-DIFF-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000006C","backup-archive-stop":"00000001000000020000006E","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
[BACKUP-FULL-8]
[BACKUP-INCR-4]
[BACKUP-FULL-9]
[BACKUP-DIFF-8]
[BACKUP-DIFF-9]
> ls -R [TEST_PATH]/db-master/repo/archive/db | grep -v "archive.info"
------------------------------------------------------------------------------------------------------------------------------------
[TEST_PATH]/db-master/repo/archive/db:
9.2-1
[TEST_PATH]/db-master/repo/archive/db/9.2-1:
0000000100000002
[TEST_PATH]/db-master/repo/archive/db/9.2-1/0000000100000002:
00000001000000020000002A-0000000000000000000000000000000000000000.gz
00000001000000020000002B-0000000000000000000000000000000000000000
00000001000000020000002C-0000000000000000000000000000000000000000.gz
000000010000000200000036-0000000000000000000000000000000000000000.gz
000000010000000200000037-0000000000000000000000000000000000000000
000000010000000200000038-0000000000000000000000000000000000000000.gz
00000001000000020000003C-0000000000000000000000000000000000000000.gz
00000001000000020000003D-0000000000000000000000000000000000000000
00000001000000020000003E-0000000000000000000000000000000000000000.gz
000000010000000200000042-0000000000000000000000000000000000000000.gz
000000010000000200000043-0000000000000000000000000000000000000000
000000010000000200000044-0000000000000000000000000000000000000000.gz
000000010000000200000048-0000000000000000000000000000000000000000.gz
000000010000000200000049-0000000000000000000000000000000000000000
00000001000000020000004A-0000000000000000000000000000000000000000.gz
00000001000000020000004E-0000000000000000000000000000000000000000.gz
00000001000000020000004F-0000000000000000000000000000000000000000
000000010000000200000050-0000000000000000000000000000000000000000.gz
000000010000000200000054-0000000000000000000000000000000000000000.gz
000000010000000200000055-0000000000000000000000000000000000000000
000000010000000200000056-0000000000000000000000000000000000000000.gz
000000010000000200000057-0000000000000000000000000000000000000000.gz
000000010000000200000058-0000000000000000000000000000000000000000
000000010000000200000059-0000000000000000000000000000000000000000.gz
00000001000000020000005A-0000000000000000000000000000000000000000.gz
00000001000000020000005B-0000000000000000000000000000000000000000
00000001000000020000005C-0000000000000000000000000000000000000000.gz
00000001000000020000005D-0000000000000000000000000000000000000000.gz
00000001000000020000005E-0000000000000000000000000000000000000000
00000001000000020000005F-0000000000000000000000000000000000000000.gz
000000010000000200000060-0000000000000000000000000000000000000000.gz
000000010000000200000061-0000000000000000000000000000000000000000
000000010000000200000062-0000000000000000000000000000000000000000.gz
000000010000000200000063-0000000000000000000000000000000000000000.gz
000000010000000200000064-0000000000000000000000000000000000000000
000000010000000200000065-0000000000000000000000000000000000000000.gz
000000010000000200000066-0000000000000000000000000000000000000000.gz
000000010000000200000067-0000000000000000000000000000000000000000
000000010000000200000068-0000000000000000000000000000000000000000.gz
000000010000000200000069-0000000000000000000000000000000000000000.gz
00000001000000020000006A-0000000000000000000000000000000000000000
00000001000000020000006B-0000000000000000000000000000000000000000.gz
00000001000000020000006C-0000000000000000000000000000000000000000.gz
00000001000000020000006D-0000000000000000000000000000000000000000
00000001000000020000006E-0000000000000000000000000000000000000000.gz
00000001000000020000006F-0000000000000000000000000000000000000000.gz
000000010000000200000070-0000000000000000000000000000000000000000
000000010000000200000071-0000000000000000000000000000000000000000.gz
Use oldest full backup for archive retention
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config="[TEST_PATH]/db-master/pgbackrest.conf" --stanza=db --log-level-console=detail --retention-full=10 --retention-diff=10 --retention-archive-type=full --retention-archive=10 expire
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=10 --retention-archive-type=full --retention-diff=10 --retention-full=10 --stanza=db
P00 INFO: full backup total < 10 - using oldest full backup for 9.2-1 archive retention
P00 DETAIL: archive retention on backup [BACKUP-FULL-8], archiveId = 9.2-1, start = 000000010000000200000054
P00 DETAIL: remove archive: start = 00000001000000020000002A, stop = 000000010000000200000050
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[backup:current]
[BACKUP-FULL-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000054","backup-archive-stop":"000000010000000200000056","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-INCR-4]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000005A","backup-archive-stop":"00000001000000020000005C","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"incr","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-FULL-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000060","backup-archive-stop":"000000010000000200000062","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-DIFF-8]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"000000010000000200000066","backup-archive-stop":"000000010000000200000068","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-FULL-9]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[BACKUP-DIFF-9]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":"00000001000000020000006C","backup-archive-stop":"00000001000000020000006E","backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-prior":"[BACKUP-DIFF-8]","backup-reference":[],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"diff","db-id":1,"option-archive-check":true,"option-archive-copy":false,"option-backup-standby":false,"option-checksum-page":true,"option-compress":true,"option-hardlink":false,"option-online":true}
[db]
db-catalog-version=201204301
db-control-version=922
db-id=1
db-system-id=6393320793115174899
db-version="9.2"
[db:history]
1={"db-catalog-version":201204301,"db-control-version":922,"db-system-id":6393320793115174899,"db-version":"9.2"}
> ls [TEST_PATH]/db-master/repo/backup/db | grep -v "backup.*"
------------------------------------------------------------------------------------------------------------------------------------
[BACKUP-FULL-8]
[BACKUP-INCR-4]
[BACKUP-FULL-9]
[BACKUP-DIFF-8]
[BACKUP-DIFF-9]
> ls -R [TEST_PATH]/db-master/repo/archive/db | grep -v "archive.info"
------------------------------------------------------------------------------------------------------------------------------------
[TEST_PATH]/db-master/repo/archive/db:
9.2-1
[TEST_PATH]/db-master/repo/archive/db/9.2-1:
0000000100000002
[TEST_PATH]/db-master/repo/archive/db/9.2-1/0000000100000002:
000000010000000200000054-0000000000000000000000000000000000000000.gz
000000010000000200000055-0000000000000000000000000000000000000000
000000010000000200000056-0000000000000000000000000000000000000000.gz
000000010000000200000057-0000000000000000000000000000000000000000.gz
000000010000000200000058-0000000000000000000000000000000000000000
000000010000000200000059-0000000000000000000000000000000000000000.gz
00000001000000020000005A-0000000000000000000000000000000000000000.gz
00000001000000020000005B-0000000000000000000000000000000000000000
00000001000000020000005C-0000000000000000000000000000000000000000.gz
00000001000000020000005D-0000000000000000000000000000000000000000.gz
00000001000000020000005E-0000000000000000000000000000000000000000
00000001000000020000005F-0000000000000000000000000000000000000000.gz
000000010000000200000060-0000000000000000000000000000000000000000.gz
000000010000000200000061-0000000000000000000000000000000000000000
000000010000000200000062-0000000000000000000000000000000000000000.gz
000000010000000200000063-0000000000000000000000000000000000000000.gz
000000010000000200000064-0000000000000000000000000000000000000000
000000010000000200000065-0000000000000000000000000000000000000000.gz
000000010000000200000066-0000000000000000000000000000000000000000.gz
000000010000000200000067-0000000000000000000000000000000000000000
000000010000000200000068-0000000000000000000000000000000000000000.gz
000000010000000200000069-0000000000000000000000000000000000000000.gz
00000001000000020000006A-0000000000000000000000000000000000000000
00000001000000020000006B-0000000000000000000000000000000000000000.gz
00000001000000020000006C-0000000000000000000000000000000000000000.gz
00000001000000020000006D-0000000000000000000000000000000000000000
00000001000000020000006E-0000000000000000000000000000000000000000.gz
00000001000000020000006F-0000000000000000000000000000000000000000.gz
000000010000000200000070-0000000000000000000000000000000000000000
000000010000000200000071-0000000000000000000000000000000000000000.gz

File diff suppressed because it is too large Load Diff

View File

@@ -85,12 +85,16 @@ stanza-create db - verify success with force (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - test force fails on database mismatch with directory (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - fail on database mismatch with directory (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --db-path=[TEST_PATH]/db-master/db/testbase/ stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - restore stanza files (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - successfully create stanza files to be upgraded (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --db-path=[TEST_PATH]/db-master/db/testbase/ --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-upgrade db - upgrade stanza files online (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
full backup - fail on backup lock exists (db-master host)

View File

@@ -136,12 +136,16 @@ stanza-create db - verify success with force (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - test force fails on database mismatch with directory (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - fail on database mismatch with directory (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --db-path=[TEST_PATH]/db-master/db/testbase/ stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - restore stanza files (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - successfully create stanza files to be upgraded (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --db-path=[TEST_PATH]/db-master/db/testbase/ --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
stanza-upgrade db - upgrade stanza files online (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
full backup - fail on backup lock exists (backup host)

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -217,7 +217,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -393,7 +393,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -532,7 +532,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -683,7 +683,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1390,7 +1390,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1488,7 +1488,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1655,7 +1655,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1776,7 +1776,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -210,7 +210,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -361,7 +361,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -498,7 +498,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -993,7 +993,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1125,7 +1125,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1286,7 +1286,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1455,7 +1455,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -210,7 +210,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -359,7 +359,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -496,7 +496,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -989,7 +989,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1087,7 +1087,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1246,7 +1246,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1364,7 +1364,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -210,7 +210,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -360,7 +360,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -497,7 +497,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -991,7 +991,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1123,7 +1123,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1283,7 +1283,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1452,7 +1452,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/db-master/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/db-master/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -214,7 +214,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -386,7 +386,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -455,7 +455,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -512,7 +512,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -573,7 +573,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -657,7 +657,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -741,7 +741,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -882,7 +882,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1411,7 +1411,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1513,7 +1513,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1695,7 +1695,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1820,7 +1820,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -214,7 +214,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -387,7 +387,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -528,7 +528,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1049,7 +1049,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1185,7 +1185,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1368,7 +1368,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1541,7 +1541,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -214,7 +214,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -384,7 +384,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -525,7 +525,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1043,7 +1043,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1145,7 +1145,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1325,7 +1325,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1447,7 +1447,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -80,7 +80,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: Db->new(): iRemoteIdx = 1
@@ -214,7 +214,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-1]
@@ -385,7 +385,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 WARN: backup [BACKUP-FULL-1] missing in repository removed from backup.info
@@ -526,7 +526,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1045,7 +1045,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1181,7 +1181,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1362,7 +1362,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: File->pathCreate(): bCreateParents = true, bIgnoreExists = true, strMode = <0750>, strPath = backup.history, strPathType = backup:cluster
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]
@@ -1535,7 +1535,7 @@ P00 DEBUG: Protocol::Protocol::protocolGet(): iRemoteIdx = <1>, oParam = [u
P00 DEBUG: Protocol::Protocol::protocolGet: create local protocol
P00 DEBUG: File->new(): oProtocol = [object], strDefaultFileMode = <0640>, strDefaultPathMode = <0750>, strRepoPath = [TEST_PATH]/backup/repo, strStanza = db
P00 DEBUG: BackupInfo->new(): bRequired = <true>, bValidate = <true>, strBackupClusterPath = [TEST_PATH]/backup/repo/backup/db
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>
P00 DEBUG: BackupInfo->reconstruct(): bRequired = <true>, bSave = <true>, iCatalogVersion = [undef], iControlVersion = [undef], strDbVersion = [undef], ullDbSysId = [undef]
P00 DEBUG: BackupCommon::backupRegExpGet(): bAnchor = <true>, bDifferential = true, bFull = true, bIncremental = true
P00 DEBUG: BackupCommon::backupRegExpGet=>: strRegExp = ^[0-9]{8}\-[0-9]{6}F(\_[0-9]{8}\-[0-9]{6}(D|I)){0,1}$
P00 DEBUG: BackupInfo->current(): strBackup = [BACKUP-FULL-2]

View File

@@ -13,18 +13,19 @@ Usage:
pgbackrest [options] [command]
Commands:
archive-get Get a WAL segment from the archive.
archive-push Push a WAL segment to the archive.
backup Backup a database cluster.
check Check the configuration.
expire Expire backups that exceed retention.
help Get help.
info Retrieve information about backups.
restore Restore a database cluster.
stanza-create Create the required stanza data.
start Allow pgBackRest processes to run.
stop Stop pgBackRest processes from running.
version Get version.
archive-get Get a WAL segment from the archive.
archive-push Push a WAL segment to the archive.
backup Backup a database cluster.
check Check the configuration.
expire Expire backups that exceed retention.
help Get help.
info Retrieve information about backups.
restore Restore a database cluster.
stanza-create Create the required stanza data.
stanza-upgrade Upgrade a stanza.
start Allow pgBackRest processes to run.
stop Stop pgBackRest processes from running.
version Get version.
Use 'pgbackrest help [command]' for more information.

View File

@@ -283,7 +283,8 @@ stanza-create db - hash check fails requiring force (db-master host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 WARN: unable to create stanza 'db'
P00 ERROR: [103]: archive file invalid; to correct, use --force
P00 ERROR: [103]: archive file invalid
HINT: use stanza-upgrade if the database has been upgraded or use --force
P00 INFO: stanza-create command end: aborted with exception [103]
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
@@ -339,15 +340,14 @@ db-version="9.4"
[db:history]
1={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - test force fails for database mismatch with directory (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - fail on database mismatch without force option (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --force --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 WARN: unable to create stanza 'db'
P00 ERROR: [119]: WAL segment version 9.3 does not match archive version 9.4
WAL segment system-id 6156904820763115222 does not match archive system-id 6353949018581704918
HINT: are you archiving to the correct stanza?
P00 INFO: stanza-create command end: aborted with exception [119]
P00 ERROR: [103]: archive file invalid
HINT: use stanza-upgrade if the database has been upgraded or use --force
P00 INFO: stanza-create command end: aborted with exception [103]
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
@@ -366,6 +366,21 @@ db-version="9.4"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - force create archive.info from uncompressed file (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -279,7 +279,8 @@ stanza-create db - hash check fails requiring force (backup host)
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 WARN: unable to create stanza 'db'
P00 ERROR: [103]: archive file invalid; to correct, use --force
P00 ERROR: [103]: archive file invalid
HINT: use stanza-upgrade if the database has been upgraded or use --force
P00 INFO: stanza-create command end: aborted with exception [103]
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
@@ -335,15 +336,14 @@ db-version="9.4"
[db:history]
1={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - test force fails for database mismatch with directory (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
stanza-create db - fail on database mismatch without force option (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --force --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 WARN: unable to create stanza 'db'
P00 ERROR: [119]: WAL segment version 9.3 does not match archive version 9.4
WAL segment system-id 6156904820763115222 does not match archive system-id 6353949018581704918
HINT: are you archiving to the correct stanza?
P00 INFO: stanza-create command end: aborted with exception [119]
P00 ERROR: [103]: archive file invalid
HINT: use stanza-upgrade if the database has been upgraded or use --force
P00 INFO: stanza-create command end: aborted with exception [103]
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
@@ -362,6 +362,21 @@ db-version="9.4"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - force create archive.info from uncompressed file (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------

View File

@@ -0,0 +1,474 @@
run 001 - local
===============
stanza-upgrade db - fail on stanza not initialized since archive.info is missing (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 ERROR: [130]: archive.info does not exist but is required to push/get WAL segments
HINT: is archive_command configured in postgresql.conf?
HINT: has a stanza-create been performed?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
P00 INFO: stanza-upgrade command end: aborted with exception [130]
stanza-create db - successfully create the stanza (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-upgrade db - already up to date (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: the stanza data is already up to date
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-upgrade db - fail on stanza not initialized since backup.info is missing (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 ERROR: [130]: [TEST_PATH]/db-master/repo/backup/db/backup.info does not exist and is required to perform a backup.
HINT: has a stanza-create been performed?
P00 INFO: stanza-upgrade command end: aborted with exception [130]
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-create db - use force to recreate the stanza (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --force --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [119]: WAL segment version 9.4 does not match archive version 9.3
WAL segment system-id 6353949018581704918 does not match archive system-id 6395542721432104958
HINT: are you archiving to the correct stanza?
stanza-upgrade db - successful upgrade creates mismatched files (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
2={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
2={"db-id":6353949018581704918,"db-version":"9.4"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - use force to recreate the stanza producing mismatched info history but same current db-id (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --force --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
2={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - use force to recreate the stanza producing mismatched db-id (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --force --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=1
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
full backup - create first full backup (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --retention-full=2 --stanza=db --start-fast --type=full
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 1e34fa1c833090d94b9bb14f2a8d3153dca6ea27
P01 INFO: backup file [TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum 89373d9f2973502940de06bc5212489df3f8a912
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-1]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=2 --retention-full=2 --stanza=db
P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
----------------------------------------------------------
[db]
db-path=[TEST_PATH]/db-master/db/base
[global]
lock-path=[TEST_PATH]/db-master/repo/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/db-master/repo/log
repo-path=[TEST_PATH]/db-master/repo
[global:backup]
archive-copy=y
start-fast=y
stanza-upgrade db - successfully upgrade with XX.Y-Z (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --stanza=db
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/repo/backup/db/backup.info
---------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[backup:current]
[BACKUP-FULL-1]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":null,"backup-archive-stop":null,"backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":true,"option-backup-standby":false,"option-checksum-page":false,"option-compress":true,"option-hardlink":false,"option-online":false}
[db]
db-catalog-version=201510051
db-control-version=942
db-id=2
db-system-id=6392579261579036436
db-version="9.5"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
2={"db-catalog-version":201510051,"db-control-version":942,"db-system-id":6392579261579036436,"db-version":"9.5"}
+ supplemental file: [TEST_PATH]/db-master/repo/archive/db/archive.info
-----------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=4
db-system-id=6392579261579036436
db-version="9.5"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
3={"db-id":35184388866048,"db-version":"10.0"}
4={"db-id":6392579261579036436,"db-version":"9.5"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
full backup - create second full backup (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --db-path=[TEST_PATH]/db-master/db/base --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --no-online --repo-path=[TEST_PATH]/db-master/repo --retention-full=2 --stanza=db --start-fast --type=full
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 15b1a1a35c26b17570aca7920980f0ad11c6d858
P01 INFO: backup file [TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum e28bf39d0a56bf9fabd4049b329fcae8878bfec6
P01 INFO: backup file [TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/db-master/pgbackrest.conf --lock-path=[TEST_PATH]/db-master/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/db-master/repo/log --repo-path=[TEST_PATH]/db-master/repo --retention-archive=2 --retention-full=2 --stanza=db
P00 INFO: removed orphaned archive path: [TEST_PATH]/db-master/repo/archive/db/10.0-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
----------------------------------------------------------
[db]
db-path=[TEST_PATH]/db-master/db/base
[global]
lock-path=[TEST_PATH]/db-master/repo/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/db-master/repo/log
repo-path=[TEST_PATH]/db-master/repo
[global:backup]
archive-copy=y
start-fast=y
info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --output=json info
------------------------------------------------------------------------------------------------------------------------------------
[
{
"archive" : {
"max" : null,
"min" : null
},
"backup" : [
{
"archive" : {
"start" : null,
"stop" : null
},
"backrest" : {
"format" : 5,
"version" : "[VERSION-1]"
},
"database" : {
"id" : 1
},
"info" : {
"delta" : [DELTA],
"repository" : {
"delta" : [DELTA],
"size" : [SIZE]
},
"size" : [SIZE]
},
"label" : "[BACKUP-FULL-1]",
"prior" : null,
"reference" : null,
"timestamp" : {
"start" : [TIMESTAMP],
"stop" : [TIMESTAMP]
},
"type" : "full"
},
{
"archive" : {
"start" : null,
"stop" : null
},
"backrest" : {
"format" : 5,
"version" : "[VERSION-1]"
},
"database" : {
"id" : 2
},
"info" : {
"delta" : [DELTA],
"repository" : {
"delta" : [DELTA],
"size" : [SIZE]
},
"size" : [SIZE]
},
"label" : "[BACKUP-FULL-2]",
"prior" : null,
"reference" : null,
"timestamp" : {
"start" : [TIMESTAMP],
"stop" : [TIMESTAMP]
},
"type" : "full"
}
],
"db" : [
{
"id" : "1",
"system-id" : 6353949018581704918,
"version" : "9.4"
},
{
"id" : "2",
"system-id" : 6392579261579036436,
"version" : "9.5"
}
],
"name" : "db",
"status" : {
"code" : 0,
"message" : "ok"
}
}
]

View File

@@ -0,0 +1,516 @@
run 002 - remote
================
stanza-upgrade db - fail on stanza not initialized since archive.info is missing (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 ERROR: [130]: archive.info does not exist but is required to push/get WAL segments
HINT: is archive_command configured in postgresql.conf?
HINT: has a stanza-create been performed?
HINT: use --no-archive-check to disable archive checks during backup if you have an alternate archiving scheme.
P00 INFO: stanza-upgrade command end: aborted with exception [130]
stanza-create db - successfully create the stanza (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-upgrade db - already up to date (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: the stanza data is already up to date
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-upgrade db - fail on stanza not initialized since backup.info is missing (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 ERROR: [130]: [TEST_PATH]/backup/repo/backup/db/backup.info does not exist and is required to perform a backup.
HINT: has a stanza-create been performed?
P00 INFO: stanza-upgrade command end: aborted with exception [130]
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
stanza-create db - use force to recreate the stanza (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --force --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201306121
db-control-version=937
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=1
db-system-id=6395542721432104958
db-version="9.3"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
P00 ERROR: [119]: raised on backup host: WAL segment version 9.4 does not match archive version 9.3
WAL segment system-id 6353949018581704918 does not match archive system-id 6395542721432104958
HINT: are you archiving to the correct stanza?
stanza-upgrade db - successful upgrade creates mismatched files (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
2={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-id":6395542721432104958,"db-version":"9.3"}
2={"db-id":6353949018581704918,"db-version":"9.4"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
stanza-create db - use force to recreate the stanza producing mismatched info history but same current db-id (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --force --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201306121,"db-control-version":937,"db-system-id":6395542721432104958,"db-version":"9.3"}
2={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
stanza-create db - use force to recreate the stanza producing mismatched db-id (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online --force stanza-create
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-create command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --force --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-create command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-catalog-version=201409291
db-control-version=942
db-id=1
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=2
db-system-id=6353949018581704918
db-version="9.4"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
full backup - create first full backup (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --retention-full=2 --stanza=db --start-fast --type=full
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 1e34fa1c833090d94b9bb14f2a8d3153dca6ea27
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum 89373d9f2973502940de06bc5212489df3f8a912
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-1]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --repo-path=[TEST_PATH]/backup/repo --retention-archive=2 --retention-full=2 --stanza=db
P00 INFO: full backup total < 2 - using oldest full backup for 9.4-2 archive retention
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
----------------------------------------------------------
[db]
db-path=[TEST_PATH]/db-master/db/base
[global]
backup-cmd=[BACKREST-BIN]
backup-config=[TEST_PATH]/backup/pgbackrest.conf
backup-host=backup
backup-user=[USER-2]
lock-path=[TEST_PATH]/db-master/spool/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/db-master/spool/log
repo-path=[TEST_PATH]/backup/repo
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
-------------------------------------------------------
[db]
db-cmd=[BACKREST-BIN]
db-config=[TEST_PATH]/db-master/pgbackrest.conf
db-host=db-master
db-path=[TEST_PATH]/db-master/db/base
db-user=[USER-1]
[global]
lock-path=[TEST_PATH]/backup/repo/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/backup/repo/log
repo-path=[TEST_PATH]/backup/repo
[global:backup]
archive-copy=y
start-fast=y
stanza-upgrade db - successfully upgrade with XX.Y-Z (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --stanza=db --log-level-console=detail --no-online stanza-upgrade
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: stanza-upgrade command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --stanza=db
P00 INFO: stanza-upgrade command end: completed successfully
+ supplemental file: [TEST_PATH]/backup/repo/backup/db/backup.info
------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[backup:current]
[BACKUP-FULL-1]={"backrest-format":5,"backrest-version":"[VERSION-1]","backup-archive-start":null,"backup-archive-stop":null,"backup-info-repo-size":[SIZE],"backup-info-repo-size-delta":[DELTA],"backup-info-size":[SIZE],"backup-info-size-delta":[DELTA],"backup-timestamp-start":[TIMESTAMP],"backup-timestamp-stop":[TIMESTAMP],"backup-type":"full","db-id":1,"option-archive-check":true,"option-archive-copy":true,"option-backup-standby":false,"option-checksum-page":false,"option-compress":true,"option-hardlink":false,"option-online":false}
[db]
db-catalog-version=201510051
db-control-version=942
db-id=2
db-system-id=6392579261579036436
db-version="9.5"
[db:history]
1={"db-catalog-version":201409291,"db-control-version":942,"db-system-id":6353949018581704918,"db-version":"9.4"}
2={"db-catalog-version":201510051,"db-control-version":942,"db-system-id":6392579261579036436,"db-version":"9.5"}
+ supplemental file: [TEST_PATH]/backup/repo/archive/db/archive.info
--------------------------------------------------------------------
[backrest]
backrest-checksum="[CHECKSUM]"
backrest-format=5
backrest-version="[VERSION-1]"
[db]
db-id=4
db-system-id=6392579261579036436
db-version="9.5"
[db:history]
2={"db-id":6353949018581704918,"db-version":"9.4"}
3={"db-id":35184388866048,"db-version":"10.0"}
4={"db-id":6392579261579036436,"db-version":"9.5"}
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --archive-queue-max=33554432 --stanza=db archive-push [TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001
------------------------------------------------------------------------------------------------------------------------------------
full backup - create second full backup (backup host)
> [CONTAINER-EXEC] backup [BACKREST-BIN] --config=[TEST_PATH]/backup/pgbackrest.conf --retention-full=2 --no-online --log-level-console=detail --type=full --stanza=db backup
------------------------------------------------------------------------------------------------------------------------------------
P00 INFO: backup command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --db-path=[TEST_PATH]/db-master/db/base --db-user=[USER-1] --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --no-online --repo-path=[TEST_PATH]/backup/repo --retention-full=2 --stanza=db --start-fast --type=full
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/000000010000000100000001 (16MB, 99%) checksum 15b1a1a35c26b17570aca7920980f0ad11c6d858
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/global/pg_control (8KB, 100%) checksum e28bf39d0a56bf9fabd4049b329fcae8878bfec6
P01 INFO: backup file db-master:[TEST_PATH]/db-master/db/base/pg_xlog/archive_status/000000010000000100000001.ready (0B, 100%)
P00 INFO: full backup size = 16MB
P00 INFO: new backup label = [BACKUP-FULL-2]
P00 INFO: backup command end: completed successfully
P00 INFO: expire command begin [BACKREST-VERSION]: --config=[TEST_PATH]/backup/pgbackrest.conf --db-cmd=[BACKREST-BIN] --db-config=[TEST_PATH]/db-master/pgbackrest.conf --db-host=db-master --lock-path=[TEST_PATH]/backup/repo/lock --log-level-console=detail --log-level-file=trace --log-level-stderr=off --log-path=[TEST_PATH]/backup/repo/log --repo-path=[TEST_PATH]/backup/repo --retention-archive=2 --retention-full=2 --stanza=db
P00 INFO: removed orphaned archive path: [TEST_PATH]/backup/repo/archive/db/10.0-3
P00 INFO: expire command end: completed successfully
+ supplemental file: [TEST_PATH]/db-master/pgbackrest.conf
----------------------------------------------------------
[db]
db-path=[TEST_PATH]/db-master/db/base
[global]
backup-cmd=[BACKREST-BIN]
backup-config=[TEST_PATH]/backup/pgbackrest.conf
backup-host=backup
backup-user=[USER-2]
lock-path=[TEST_PATH]/db-master/spool/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/db-master/spool/log
repo-path=[TEST_PATH]/backup/repo
+ supplemental file: [TEST_PATH]/backup/pgbackrest.conf
-------------------------------------------------------
[db]
db-cmd=[BACKREST-BIN]
db-config=[TEST_PATH]/db-master/pgbackrest.conf
db-host=db-master
db-path=[TEST_PATH]/db-master/db/base
db-user=[USER-1]
[global]
lock-path=[TEST_PATH]/backup/repo/lock
log-level-console=debug
log-level-file=trace
log-level-stderr=off
log-path=[TEST_PATH]/backup/repo/log
repo-path=[TEST_PATH]/backup/repo
[global:backup]
archive-copy=y
start-fast=y
info all stanzas - db upgraded - db-1 and db-2 listed (db-master host)
> [CONTAINER-EXEC] db-master [BACKREST-BIN] --config=[TEST_PATH]/db-master/pgbackrest.conf --log-level-console=warn --output=json info
------------------------------------------------------------------------------------------------------------------------------------
[
{
"archive" : {
"max" : null,
"min" : null
},
"backup" : [
{
"archive" : {
"start" : null,
"stop" : null
},
"backrest" : {
"format" : 5,
"version" : "[VERSION-1]"
},
"database" : {
"id" : 1
},
"info" : {
"delta" : [DELTA],
"repository" : {
"delta" : [DELTA],
"size" : [SIZE]
},
"size" : [SIZE]
},
"label" : "[BACKUP-FULL-1]",
"prior" : null,
"reference" : null,
"timestamp" : {
"start" : [TIMESTAMP],
"stop" : [TIMESTAMP]
},
"type" : "full"
},
{
"archive" : {
"start" : null,
"stop" : null
},
"backrest" : {
"format" : 5,
"version" : "[VERSION-1]"
},
"database" : {
"id" : 2
},
"info" : {
"delta" : [DELTA],
"repository" : {
"delta" : [DELTA],
"size" : [SIZE]
},
"size" : [SIZE]
},
"label" : "[BACKUP-FULL-2]",
"prior" : null,
"reference" : null,
"timestamp" : {
"start" : [TIMESTAMP],
"stop" : [TIMESTAMP]
},
"type" : "full"
}
],
"db" : [
{
"id" : "1",
"system-id" : 6353949018581704918,
"version" : "9.4"
},
{
"id" : "2",
"system-id" : 6392579261579036436,
"version" : "9.5"
}
],
"name" : "db",
"status" : {
"code" : 0,
"message" : "ok"
}
}
]

View File

@@ -68,6 +68,12 @@ use constant TESTDEF_MODULE_ARCHIVE_PUSH_FILE => TESTDEF_M
use constant TESTDEF_MODULE_INFO => 'Info';
push @EXPORT, qw(TESTDEF_MODULE_INFO);
use constant TESTDEF_MODULE_STANZA => 'Stanza';
push @EXPORT, qw(TESTDEF_MODULE_STANZA);
use constant TESTDEF_MODULE_EXPIRE => 'Expire';
push @EXPORT, qw(TESTDEF_MODULE_EXPIRE);
################################################################################################################################
# Define tests
################################################################################################################################
@@ -205,12 +211,26 @@ my $oTestDef =
&TESTDEF_TEST_CONTAINER => false,
&TESTDEF_EXPECT => true,
&TESTDEF_TEST_COVERAGE =>
{
&TESTDEF_MODULE_STANZA => TESTDEF_COVERAGE_FULL,
},
&TESTDEF_TEST =>
[
{
&TESTDEF_TEST_NAME => 'unit',
&TESTDEF_EXPECT => false,
&TESTDEF_TEST_TOTAL => 2,
},
{
&TESTDEF_TEST_NAME => 'create',
&TESTDEF_TEST_TOTAL => 2
},
{
&TESTDEF_TEST_NAME => 'upgrade',
&TESTDEF_TEST_TOTAL => 2
},
]
},
# Archive tests
@@ -289,11 +309,16 @@ my $oTestDef =
&TESTDEF_TEST_CONTAINER => false,
&TESTDEF_EXPECT => true,
&TESTDEF_TEST_COVERAGE =>
{
&TESTDEF_MODULE_EXPIRE => TESTDEF_COVERAGE_FULL,
},
&TESTDEF_TEST =>
[
{
&TESTDEF_TEST_NAME => 'expire',
&TESTDEF_TEST_TOTAL => 1
&TESTDEF_TEST_TOTAL => 2,
},
]
},

View File

@@ -29,10 +29,22 @@ use pgBackRestTest::Common::HostGroupTest;
####################################################################################################################################
# Constants
####################################################################################################################################
use constant WAL_VERSION_92 => '92';
push @EXPORT, qw(WAL_VERSION_92);
use constant WAL_VERSION_92_SYS_ID => 6393320793115174899;
push @EXPORT, qw(WAL_VERSION_92_SYS_ID);
use constant WAL_VERSION_93 => '93';
push @EXPORT, qw(WAL_VERSION_93);
use constant WAL_VERSION_93_SYS_ID => 6395542721432104958;
push @EXPORT, qw(WAL_VERSION_93_SYS_ID);
use constant WAL_VERSION_94 => '94';
push @EXPORT, qw(WAL_VERSION_94);
use constant WAL_VERSION_94_SYS_ID => 6353949018581704918;
push @EXPORT, qw(WAL_VERSION_94_SYS_ID);
use constant WAL_VERSION_95 => '95';
push @EXPORT, qw(WAL_VERSION_95);
use constant WAL_VERSION_95_SYS_ID => 6392579261579036436;
push @EXPORT, qw(WAL_VERSION_95_SYS_ID);
####################################################################################################################################
# initModule

View File

@@ -209,6 +209,7 @@ sub backupEnd
$strType,
$oExecuteBackup,
$oParam,
$bManifestCompare,
) =
logDebugParam
(
@@ -216,6 +217,7 @@ sub backupEnd
{name => 'strType', trace => true},
{name => 'oExecuteBackup', trace => true},
{name => 'oParam', required => false, trace => true},
{name => 'bManifestCompare', required => false, default => true, trace => true},
);
# Set defaults
@@ -333,10 +335,14 @@ sub backupEnd
# Only do compare for synthetic backups since for real backups the expected manifest *is* the actual manifest.
if ($self->synthetic())
{
# Set backup type in the expected manifest
${$oExpectedManifest}{&MANIFEST_SECTION_BACKUP}{&MANIFEST_KEY_TYPE} = $strType;
# Compare only if expected to do so
if ($bManifestCompare)
{
# Set backup type in the expected manifest
${$oExpectedManifest}{&MANIFEST_SECTION_BACKUP}{&MANIFEST_KEY_TYPE} = $strType;
$self->backupCompare($strBackup, $oExpectedManifest);
$self->backupCompare($strBackup, $oExpectedManifest);
}
}
# Add files to expect log
@@ -359,7 +365,7 @@ sub backupEnd
$self->{oLogTest}->supplementalAdd($oHostGroup->hostGet(HOST_BACKUP)->testPath() . '/' . BACKREST_CONF);
}
if ($self->synthetic())
if ($self->synthetic() && $bManifestCompare)
{
$self->{oLogTest}->supplementalAdd($self->{oFile}->pathGet(PATH_BACKUP_CLUSTER, "${strBackup}/" . FILE_MANIFEST));
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
@@ -388,6 +394,7 @@ sub backup
$strType,
$strComment,
$oParam,
$bManifestCompare,
) =
logDebugParam
(
@@ -395,10 +402,11 @@ sub backup
{name => 'strType'},
{name => 'strComment'},
{name => 'oParam', required => false},
{name => 'bManifestCompare', required => false, default => true},
);
my $oExecuteBackup = $self->backupBegin($strType, $strComment, $oParam);
my $strBackup = $self->backupEnd($strType, $oExecuteBackup, $oParam);
my $strBackup = $self->backupEnd($strType, $oExecuteBackup, $oParam, $bManifestCompare);
# Return from function and log return values if any
return logDebugReturn
@@ -760,6 +768,60 @@ sub stanzaCreate
return logDebugReturn($strOperation);
}
####################################################################################################################################
# stanzaUpgrade
####################################################################################################################################
sub stanzaUpgrade
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$strComment,
$oParam,
) =
logDebugParam
(
__PACKAGE__ . '->stanzaUpgrade', \@_,
{name => 'strComment'},
{name => 'oParam', required => false},
);
$strComment =
'stanza-upgrade ' . $self->stanza() . ' - ' . $strComment .
' (' . $self->nameGet() . ' host)';
&log(INFO, " $strComment");
$self->executeSimple(
$self->backrestExe() .
' --config=' . $self->backrestConfig() .
' --stanza=' . $self->stanza() .
' --log-level-console=detail' .
(defined($$oParam{strOptionalParam}) ? " $$oParam{strOptionalParam}" : '') .
' stanza-upgrade',
{strComment => $strComment, iExpectedExitStatus => $$oParam{iExpectedExitStatus}, oLogTest => $self->{oLogTest},
bLogOutput => $self->synthetic()});
# If the info file was created, then add it to the expect log
if (defined($self->{oLogTest}) && $self->synthetic() &&
fileExists($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info'))
{
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
}
if (defined($self->{oLogTest}) && $self->synthetic() &&
fileExists($self->repoPath() . '/archive/' . $self->stanza() . '/archive.info'))
{
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/archive/' . $self->stanza() . '/archive.info');
}
# Return from function and log return values if any
return logDebugReturn($strOperation);
}
####################################################################################################################################
# start
####################################################################################################################################

View File

@@ -21,8 +21,10 @@ use pgBackRest::DbVersion;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::Manifest;
use pgBackRest::Stanza;
use pgBackRest::Version;
use pgBackRestTest::Common::Env::EnvHostTest;
use pgBackRestTest::Common::Host::HostBaseTest;
use pgBackRestTest::Common::ExecuteTest;
use pgBackRestTest::Common::FileTest;
@@ -44,7 +46,8 @@ sub new
$self->{oHostBackup},
$self->{strBackRestExe},
$self->{oFile},
$self->{oLogTest}
$self->{oLogTest},
$self->{oRunTest},
) =
logDebugParam
(
@@ -52,7 +55,8 @@ sub new
{name => 'oHostBackup', required => false, trace => true},
{name => 'strBackRestExe', trace => true},
{name => 'oFile', trace => true},
{name => 'oLogTest', required => false, trace => true}
{name => 'oLogTest', required => false, trace => true},
{name => 'oRunTest', required => false, trace => true},
);
# Return from function and log return values if any
@@ -63,6 +67,71 @@ sub new
);
}
####################################################################################################################################
# stanzaSet - set the local stanza object
####################################################################################################################################
sub stanzaSet
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$strStanza,
$strDbVersion,
$bStanzaUpgrade,
) =
logDebugParam
(
__PACKAGE__ . '->stanzaSet', \@_,
{name => 'strStanza'},
{name => 'strDbVersion'},
{name => 'bStanzaUpgrade'},
);
# Assign variables
my $oStanza = {};
my $oStanzaCreate = new pgBackRest::Stanza();
# If we're not upgrading, then create the stanza
if (!$bStanzaUpgrade)
{
$oStanzaCreate->stanzaCreate();
}
# Get the database info for the stanza
$$oStanza{strDbVersion} = $strDbVersion;
$$oStanza{ullDbSysId} = $oStanzaCreate->{oDb}{ullDbSysId};
$$oStanza{iCatalogVersion} = $oStanzaCreate->{oDb}{iCatalogVersion};
$$oStanza{iControlVersion} = $oStanzaCreate->{oDb}{iControlVersion};
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($self->{oFile}->pathGet(PATH_BACKUP_ARCHIVE));
my $oBackupInfo = new pgBackRest::BackupInfo($self->{oFile}->pathGet(PATH_BACKUP_CLUSTER));
if ($bStanzaUpgrade)
{
# Upgrade the stanza
$oArchiveInfo->dbSectionSet($$oStanza{strDbVersion}, $$oStanza{ullDbSysId}, $oArchiveInfo->dbHistoryIdGet() + 1);
$oArchiveInfo->save();
$oBackupInfo->dbSectionSet($$oStanza{strDbVersion}, $$oStanza{iControlVersion}, $$oStanza{iCatalogVersion},
$$oStanza{ullDbSysId}, $oBackupInfo->dbHistoryIdGet() + 1);
$oBackupInfo->save();
}
# Get the archive and directory paths for the stanza
$$oStanza{strArchiveClusterPath} = $self->{oFile}->pathGet(PATH_BACKUP_ARCHIVE) . '/' . ($oArchiveInfo->archiveId());
$$oStanza{strBackupClusterPath} = $self->{oFile}->pathGet(PATH_BACKUP_CLUSTER);
filePathCreate($$oStanza{strArchiveClusterPath}, undef, undef, true);
$self->{oStanzaHash}{$strStanza} = $oStanza;
# Return from function and log return values if any
return logDebugReturn($strOperation);
}
####################################################################################################################################
# stanzaCreate
####################################################################################################################################
@@ -75,57 +144,74 @@ sub stanzaCreate
(
$strOperation,
$strStanza,
$strDbVersion
$strDbVersion,
) =
logDebugParam
(
__PACKAGE__ . '->sanzaCreate', \@_,
__PACKAGE__ . '->stanzaCreate', \@_,
{name => 'strStanza'},
{name => 'strDbVersion'}
{name => 'strDbVersion'},
);
# Assign variables
my $oStanza = {};
$$oStanza{strDbVersion} = $strDbVersion;
$$oStanza{iDbId} = 1;
# Create the system id
my $strDbVersionTemp = $strDbVersion;
$strDbVersionTemp =~ s/\.//;
$$oStanza{ullDbSysId} = $strDbVersionTemp . '000000000000000' . $$oStanza{iDbId};
$$oStanza{iCatalogVersion} = '20' . $strDbVersionTemp . '0101';
$$oStanza{iControlVersion} = $strDbVersionTemp . '1';
# Create the stanza backup path
my $strBackupClusterPath = $self->{oFile}->pathGet(PATH_BACKUP_CLUSTER);
filePathCreate("${strBackupClusterPath}/" . PATH_BACKUP_HISTORY, undef, undef, true);
my $strDbPath = optionGet(OPTION_DB_PATH);
$$oStanza{strBackupClusterPath} = $strBackupClusterPath;
# Create the test path for pg_control
filePathCreate(($strDbPath . '/' . DB_PATH_GLOBAL), undef, true);
# Create the backup info object
my $oBackupInfo = (new pgBackRest::BackupInfo($$oStanza{strBackupClusterPath}, false, false))->create(
$strDbVersion, $$oStanza{ullDbSysId}, $$oStanza{iControlVersion}, $$oStanza{iCatalogVersion});
# Copy pg_control for stanza-create
executeTest(
'cp ' . $self->{oRunTest}->dataPath() . '/backup.pg_control_' . $strDbVersionTemp . '.bin ' . $strDbPath .
'/' . DB_FILE_PGCONTROL);
executeTest('sudo chmod 600 ' . $strDbPath . '/' . DB_FILE_PGCONTROL);
# Create the stanza archive path
my $strArchiveClusterPath = $self->{oFile}->pathGet(PATH_BACKUP_ARCHIVE);
filePathCreate($strArchiveClusterPath, undef, undef, true);
# Create the archive info object
$$oStanza{oArchiveInfo} = new pgBackRest::Archive::ArchiveInfo($strArchiveClusterPath, false);
$$oStanza{oArchiveInfo}->create($$oStanza{strDbVersion}, $$oStanza{ullDbSysId});
# Create the stanza archive version path
$strArchiveClusterPath .= '/' . $$oStanza{strDbVersion} . '-' . $$oStanza{iDbId};
filePathCreate($strArchiveClusterPath, undef, undef, true);
$$oStanza{strArchiveClusterPath} = $strArchiveClusterPath;
$self->{oStanzaHash}{$strStanza} = $oStanza;
# Create the stanza and set the local stanza object
$self->stanzaSet($strStanza, $strDbVersion, false);
# Return from function and log return values if any
return logDebugReturn($strOperation);
}
####################################################################################################################################
# stanzaUpgrade
####################################################################################################################################
sub stanzaUpgrade
{
my $self = shift;
# Assign function parameters, defaults, and log debug info
my
(
$strOperation,
$strStanza,
$strDbVersion,
) =
logDebugParam
(
__PACKAGE__ . '->stanzaUpgrade', \@_,
{name => 'strStanza'},
{name => 'strDbVersion'},
);
my $strDbVersionTemp = $strDbVersion;
$strDbVersionTemp =~ s/\.//;
# Remove pg_control
fileRemove(optionGet(OPTION_DB_PATH) . '/' . DB_FILE_PGCONTROL);
# Copy pg_control for stanza-upgrade
executeTest(
'cp ' . $self->{oRunTest}->dataPath() . '/backup.pg_control_' . $strDbVersionTemp . '.bin ' . optionGet(OPTION_DB_PATH) .
'/' . DB_FILE_PGCONTROL);
executeTest('sudo chmod 600 ' . optionGet(OPTION_DB_PATH) . '/' . DB_FILE_PGCONTROL);
$self->stanzaSet($strStanza, $strDbVersion, true);
# Return from function and log return values if any
return logDebugReturn($strOperation);
}
####################################################################################################################################
# backupCreate
####################################################################################################################################

View File

@@ -12,6 +12,7 @@ use warnings FATAL => qw(all);
use Carp qw(confess);
use File::Basename qw(dirname);
use Storable qw(dclone);
use pgBackRest::Archive::ArchiveInfo;
use pgBackRest::BackupInfo;
@@ -21,6 +22,7 @@ use pgBackRest::Common::Ini;
use pgBackRest::Common::Log;
use pgBackRest::Common::Wait;
use pgBackRest::Config::Config;
use pgBackRest::Expire;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::Manifest;
@@ -30,6 +32,27 @@ use pgBackRestTest::Common::ExecuteTest;
use pgBackRestTest::Common::RunTest;
use pgBackRestTest::Expire::ExpireEnvTest;
####################################################################################################################################
# initStanzaOption
####################################################################################################################################
sub initStanzaOption
{
my $self = shift;
my $oOption = shift;
my $strDbBasePath = shift;
my $strRepoPath = shift;
$self->optionSetTest($oOption, OPTION_STANZA, $self->stanza());
$self->optionSetTest($oOption, OPTION_DB_PATH, $strDbBasePath);
$self->optionSetTest($oOption, OPTION_REPO_PATH, $strRepoPath);
$self->optionSetTest($oOption, OPTION_LOG_PATH, $self->testPath());
$self->optionBoolSetTest($oOption, OPTION_ONLINE, false);
$self->optionSetTest($oOption, OPTION_DB_TIMEOUT, 5);
$self->optionSetTest($oOption, OPTION_PROTOCOL_TIMEOUT, 6);
}
####################################################################################################################################
# run
####################################################################################################################################
@@ -37,22 +60,27 @@ sub run
{
my $self = shift;
use constant SECONDS_PER_DAY => 86400;
my $lBaseTime = time() - (SECONDS_PER_DAY * 56);
my $strDescription;
my $oOption = {};
if ($self->begin("local"))
{
# Create hosts, file object, and config
my ($oHostDbMaster, $oHostDbStandby, $oHostBackup, $oFile) = $self->setup(true, $self->expect());
# Create the test object
my $oExpireTest = new pgBackRestTest::Expire::ExpireEnvTest($oHostBackup, $self->backrestExe(), $oFile, $self->expect());
$self->initStanzaOption($oOption, $oHostDbMaster->dbBasePath(), $oHostBackup->{strRepoPath});
$self->configLoadExpect(dclone($oOption), CMD_STANZA_CREATE);
# Create the test object
my $oExpireTest = new pgBackRestTest::Expire::ExpireEnvTest($oHostBackup, $self->backrestExe(), $oFile, $self->expect(),
$self);
# ??? This function creates data elements in the $oExpireTest object that are used by the $oExpireTest functions. But
# should probably change to use the stanza-create command especially with stanza-upgrade.
$oExpireTest->stanzaCreate($self->stanza(), PG_VERSION_92);
use constant SECONDS_PER_DAY => 86400;
my $lBaseTime = time() - (SECONDS_PER_DAY * 56);
#-----------------------------------------------------------------------------------------------------------------------
my $strDescription = 'Nothing to expire';
$strDescription = 'Nothing to expire';
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_INCR, $lBaseTime += SECONDS_PER_DAY, 246);
@@ -128,6 +156,101 @@ sub run
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_DIFF, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_DIFF, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), undef, undef, BACKUP_TYPE_DIFF, undef, $strDescription);
#-----------------------------------------------------------------------------------------------------------------------
$strDescription = 'Use oldest full backup for archive retention';
$oExpireTest->process($self->stanza(), 10, 10, BACKUP_TYPE_FULL, 10, $strDescription);
}
if ($self->begin("Expire::stanzaUpgrade"))
{
# Create hosts, file object, and config
my ($oHostDbMaster, $oHostDbStandby, $oHostBackup, $oFile) = $self->setup(true, $self->expect());
$self->initStanzaOption($oOption, $oHostDbMaster->dbBasePath(), $oHostBackup->{strRepoPath});
$self->configLoadExpect(dclone($oOption), CMD_STANZA_CREATE);
# Create the test object
my $oExpireTest = new pgBackRestTest::Expire::ExpireEnvTest($oHostBackup, $self->backrestExe(), $oFile, $self->expect(),
$self);
$oExpireTest->stanzaCreate($self->stanza(), PG_VERSION_92);
#-----------------------------------------------------------------------------------------------------------------------
$strDescription = 'Create backups in current db version';
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_INCR, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), undef, undef, BACKUP_TYPE_DIFF, undef, $strDescription);
#-----------------------------------------------------------------------------------------------------------------------
$strDescription = 'Upgrade stanza and expire only earliest db backup and archive';
$oExpireTest->stanzaUpgrade($self->stanza(), PG_VERSION_93);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_INCR, $lBaseTime += SECONDS_PER_DAY, 246);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_DIFF, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), 3, undef, BACKUP_TYPE_FULL, undef, $strDescription);
#-----------------------------------------------------------------------------------------------------------------------
$strDescription = 'Upgrade the stanza, create full back - earliest db orphaned archive removed and earliest full backup ' .
'and archive in previous db version removed';
$oExpireTest->stanzaUpgrade($self->stanza(), PG_VERSION_95);
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), 2, undef, BACKUP_TYPE_FULL, undef, $strDescription);
#-----------------------------------------------------------------------------------------------------------------------
$strDescription = 'Expire all archive last full backup through pitr';
$oExpireTest->backupCreate($self->stanza(), BACKUP_TYPE_FULL, $lBaseTime += SECONDS_PER_DAY);
$oExpireTest->process($self->stanza(), 3, 1, BACKUP_TYPE_DIFF, 1, $strDescription);
#-----------------------------------------------------------------------------------------------------------------------
$self->optionReset($oOption, OPTION_DB_PATH);
$self->optionReset($oOption, OPTION_ONLINE);
$self->optionSetTest($oOption, OPTION_RETENTION_FULL, 1);
$self->optionSetTest($oOption, OPTION_RETENTION_DIFF, 1);
$self->optionSetTest($oOption, OPTION_RETENTION_ARCHIVE_TYPE, BACKUP_TYPE_FULL);
$self->optionSetTest($oOption, OPTION_RETENTION_ARCHIVE, 1);
$self->configLoadExpect(dclone($oOption), CMD_EXPIRE);
$strDescription = 'Expiration cannot occur due to info file db mismatch';
my $oExpire = new pgBackRest::Expire();
# Mismatched version
$oHostBackup->infoMunge($oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE),
{&INFO_ARCHIVE_SECTION_DB =>
{&INFO_ARCHIVE_KEY_DB_VERSION => PG_VERSION_93, &INFO_ARCHIVE_KEY_DB_SYSTEM_ID => WAL_VERSION_95_SYS_ID},
&INFO_ARCHIVE_SECTION_DB_HISTORY =>
{'3' =>
{&INFO_ARCHIVE_KEY_DB_VERSION => PG_VERSION_93, &INFO_ARCHIVE_KEY_DB_ID => WAL_VERSION_95_SYS_ID}}});
$self->testException(sub {$oExpire->process()},
ERROR_FILE_INVALID,
"archive and backup database versions do not match\n" .
"HINT: has a stanza-upgrade been performed?");
# Restore the info file
$oHostBackup->infoRestore($oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE));
# Mismatched system ID
$oHostBackup->infoMunge($oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE),
{&INFO_ARCHIVE_SECTION_DB =>
{&INFO_ARCHIVE_KEY_DB_SYSTEM_ID => 6999999999999999999},
&INFO_ARCHIVE_SECTION_DB_HISTORY =>
{'3' =>
{&INFO_ARCHIVE_KEY_DB_VERSION => PG_VERSION_95, &INFO_ARCHIVE_KEY_DB_ID => 6999999999999999999}}});
$self->testException(sub {$oExpire->process()},
ERROR_FILE_INVALID,
"archive and backup database versions do not match\n" .
"HINT: has a stanza-upgrade been performed?");
# Restore the info file
$oHostBackup->infoRestore($oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE));
}
}

View File

@@ -24,6 +24,7 @@ use pgBackRest::Common::Wait;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRest::Version;
@@ -245,7 +246,7 @@ sub run
# Restart the cluster ignoring any errors in the postgresql log
$oHostDbMaster->clusterRestart({bIgnoreLogError => true});
# Stanza Create - ??? move to stanza-create tests when can create a backup synthetically
# Stanza Create
#-----------------------------------------------------------------------------------------------------------------------
# With data existing in the archive and backup directory, remove backup info file and confirm failure
executeTest('sudo rm ' . $oHostBackup->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
@@ -258,26 +259,60 @@ sub run
# Remove the backup info file
executeTest('sudo rm ' . $oHostBackup->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
# Change the database version by copying a new pg_control file
executeTest('sudo mv ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL .
' ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL . 'save');
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $oHostDbMaster->dbBasePath() . '/' .
DB_FILE_PGCONTROL);
# Change the database version by copying a new pg_control file to a new db-path to use for db mismatch test
filePathCreate($oHostDbMaster->dbPath() . '/testbase/' . DB_PATH_GLOBAL, undef, true, true);
if ($self->pgVersion() eq PG_VERSION_94)
{
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_95 . '.bin ' . $oHostDbMaster->dbPath() .
'/testbase/' . DB_FILE_PGCONTROL);
} else
{
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $oHostDbMaster->dbPath() .
'/testbase/' . DB_FILE_PGCONTROL);
}
# Run stanza-create with --force
$oHostBackup->stanzaCreate('test force fails on database mismatch with directory',
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, strOptionalParam => '--no-' . OPTION_ONLINE .
# Run stanza-create online to confirm proper handling of configValidation error against new db-path
$oHostBackup->stanzaCreate('fail on database mismatch with directory',
{strOptionalParam => ' --' . OPTION_DB_PATH . '=' . $oHostDbMaster->dbPath() . '/testbase/',
iExpectedExitStatus => ERROR_DB_MISMATCH});
# Stanza Upgrade - tests configValidate code - all other tests in synthetic integration tests
#-----------------------------------------------------------------------------------------------------------------------
# Run stanza-create offline with --force to create files needing to be upgraded (using new db-path)
$oHostBackup->stanzaCreate('successfully create stanza files to be upgraded',
{strOptionalParam => ' --' . OPTION_DB_PATH . '=' . $oHostDbMaster->dbPath() . '/testbase/ --no-' . OPTION_ONLINE .
' --' . OPTION_FORCE});
my $oAchiveInfo = new pgBackRest::Archive::ArchiveInfo($oHostBackup->repoPath() . '/archive/' . $self->stanza());
my $oBackupInfo = new pgBackRest::BackupInfo($oHostBackup->repoPath() . '/backup/' . $self->stanza());
# Restore the database version
executeTest('sudo rm ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);
executeTest('sudo mv ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL . 'save' .
' ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);
# Read info files to confirm the files were created with a different database version
if ($self->pgVersion() eq PG_VERSION_94)
{
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
PG_VERSION_95)}, true, 'archive upgrade forced with db-mismatch');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
PG_VERSION_95)}, true, 'backup upgrade forced with db-mismatch');
}
else
{
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
PG_VERSION_94)}, true, 'archive create forced with db-mismatch in prep for stanza-upgrade');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
PG_VERSION_94)}, true, 'backup create forced with db-mismatch in prep for stanza-upgrade');
}
# Run stanza-create offline with --force
$oHostBackup->stanzaCreate('restore stanza files',
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
# Run stanza-upgrade online with the default db-path to correct the info files
$oHostBackup->stanzaUpgrade('upgrade stanza files online');
# Reread the info files and confirm the result
$oAchiveInfo = new pgBackRest::Archive::ArchiveInfo($oHostBackup->repoPath() . '/archive/' . $self->stanza());
$oBackupInfo = new pgBackRest::BackupInfo($oHostBackup->repoPath() . '/backup/' . $self->stanza());
$self->testResult(sub {$oAchiveInfo->test(INFO_ARCHIVE_SECTION_DB, INFO_ARCHIVE_KEY_DB_VERSION, undef,
$self->pgVersion())}, true, 'archive upgrade online corrects db');
$self->testResult(sub {$oBackupInfo->test(INFO_BACKUP_SECTION_DB, INFO_BACKUP_KEY_DB_VERSION, undef,
$self->pgVersion())}, true, 'backup upgrade online corrects db');
}
# Full backup

View File

@@ -23,6 +23,7 @@ use pgBackRest::Common::Wait;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::LibC qw(:checksum);
use pgBackRest::Manifest;
use pgBackRest::Version;

View File

@@ -24,6 +24,7 @@ use pgBackRest::DbVersion;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::Info;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
@@ -43,6 +44,7 @@ sub initModule
$self->{strRepoPath} = $self->testPath() . '/repo';
$self->{strArchivePath} = "$self->{strRepoPath}/archive/" . $self->stanza();
$self->{strBackupPath} = "$self->{strRepoPath}/backup/" . $self->stanza();
$self->{strDbPath} = $self->testPath() . '/db';
# Create the local file object
$self->{oFile} =
@@ -67,8 +69,30 @@ sub initTest
{
my $self = shift;
# Create parent path for pg_control
filePathCreate(($self->{strDbPath} . '/' . DB_PATH_GLOBAL), undef, false, true);
# Create archive info path
filePathCreate($self->{strArchivePath}, undef, true, true);
# Create backup info path
filePathCreate($self->{strBackupPath}, undef, true, true);
# Create the test object
$self->{oExpireTest} = new pgBackRestTest::Expire::ExpireEnvTest(undef, $self->backrestExe(), $self->{oFile}, undef);
$self->{oExpireTest} = new pgBackRestTest::Expire::ExpireEnvTest(undef, $self->backrestExe(), $self->{oFile}, undef, $self);
# Set options for stanzaCreate
my $oOption = {};
$self->optionSetTest($oOption, OPTION_STANZA, $self->stanza());
$self->optionSetTest($oOption, OPTION_DB_PATH, $self->{strDbPath});
$self->optionSetTest($oOption, OPTION_REPO_PATH, $self->{strRepoPath});
$self->optionSetTest($oOption, OPTION_LOG_PATH, $self->testPath());
$self->optionBoolSetTest($oOption, OPTION_ONLINE, false);
$self->optionSetTest($oOption, OPTION_DB_TIMEOUT, 5);
$self->optionSetTest($oOption, OPTION_PROTOCOL_TIMEOUT, 6);
$self->configLoadExpect(dclone($oOption), CMD_STANZA_CREATE);
$self->{oExpireTest}->stanzaCreate($self->stanza(), PG_VERSION_94);
}

View File

@@ -23,6 +23,7 @@ use pgBackRest::Common::Wait;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRestTest::Common::Env::EnvHostTest;
@@ -119,16 +120,11 @@ sub run
# Change the database version by copying a new pg_control file
executeTest('sudo rm ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);
executeTest('cp ' . $self->dataPath() . '/backup.pg_control_93.bin ' . $oHostDbMaster->dbBasePath() . '/' .
DB_FILE_PGCONTROL);
executeTest('cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_93 . '.bin ' . $oHostDbMaster->dbBasePath() .
'/' . DB_FILE_PGCONTROL);
# Remove the archive info file
$oHostBackup->executeSimple('rm ' . $oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE));
# Run stanza-create with --force
$oHostBackup->stanzaCreate('test force fails for database mismatch with directory',
{iExpectedExitStatus => ERROR_ARCHIVE_MISMATCH, strOptionalParam => '--no-' . OPTION_ONLINE .
' --' . OPTION_FORCE});
$oHostBackup->stanzaCreate('fail on database mismatch without force option',
{iExpectedExitStatus => ERROR_FILE_INVALID, strOptionalParam => '--no-' . OPTION_ONLINE});
# Restore pg_control
executeTest('sudo rm ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);

View File

@@ -0,0 +1,180 @@
####################################################################################################################################
# ArchivePushUnitTest.pm - Unit tests for ArchivePush and ArchivePush Async
####################################################################################################################################
package pgBackRestTest::Stanza::StanzaUnitTest;
use parent 'pgBackRestTest::Common::Env::EnvHostTest';
####################################################################################################################################
# Perl includes
####################################################################################################################################
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use English '-no_match_vars';
use File::Basename qw(dirname);
use Storable qw(dclone);
use pgBackRest::Archive::ArchiveCommon;
use pgBackRest::Archive::ArchiveInfo;
use pgBackRest::BackupInfo;
use pgBackRest::Common::Exception;
use pgBackRest::Common::Lock;
use pgBackRest::Common::Log;
use pgBackRest::Config::Config;
use pgBackRest::DbVersion;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::Manifest;
use pgBackRest::Protocol::Common;
use pgBackRest::Protocol::Protocol;
use pgBackRest::Stanza;
use pgBackRestTest::Common::Env::EnvHostTest;
use pgBackRestTest::Common::ExecuteTest;
use pgBackRestTest::Common::Host::HostBackupTest;
use pgBackRestTest::Common::RunTest;
####################################################################################################################################
# initModule
####################################################################################################################################
sub initModule
{
my $self = shift;
$self->{strDbPath} = $self->testPath() . '/db';
$self->{strRepoPath} = $self->testPath() . '/repo';
$self->{strArchivePath} = "$self->{strRepoPath}/archive/" . $self->stanza();
$self->{strBackupPath} = "$self->{strRepoPath}/backup/" . $self->stanza();
$self->{strSpoolPath} = "$self->{strArchivePath}/out";
}
####################################################################################################################################
# initTest
####################################################################################################################################
sub initTest
{
my $self = shift;
# Create archive info path
filePathCreate($self->{strArchivePath}, undef, true, true);
# Create backup info path
filePathCreate($self->{strBackupPath}, undef, true, true);
# Create pg_control path
filePathCreate(($self->{strDbPath} . '/' . DB_PATH_GLOBAL), undef, false, true);
# Copy a pg_control file into the pg_control path
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $self->{strDbPath} . '/' .
DB_FILE_PGCONTROL);
}
####################################################################################################################################
# run
####################################################################################################################################
sub run
{
my $self = shift;
my $oOption = {};
$self->optionSetTest($oOption, OPTION_STANZA, $self->stanza());
$self->optionSetTest($oOption, OPTION_DB_PATH, $self->{strDbPath});
$self->optionSetTest($oOption, OPTION_REPO_PATH, $self->{strRepoPath});
$self->optionSetTest($oOption, OPTION_LOG_PATH, $self->testPath());
$self->optionBoolSetTest($oOption, OPTION_ONLINE, false);
$self->optionSetTest($oOption, OPTION_DB_TIMEOUT, 5);
$self->optionSetTest($oOption, OPTION_PROTOCOL_TIMEOUT, 6);
# ??? Currently only contains unit tests for stanza-upgrade. TODO stanza-create
################################################################################################################################
if ($self->begin("Stanza::stanzaUpgrade"))
{
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($self->{strArchivePath}, false);
$oArchiveInfo->create('9.3', '6999999999999999999', true);
my $oBackupInfo = new pgBackRest::BackupInfo($self->{strBackupPath}, false, false);
$oBackupInfo->create('9.3', '6999999999999999999', '937', '201306121', true);
logDisable(); $self->configLoadExpect(dclone($oOption), CMD_STANZA_UPGRADE); logEnable();
my $oStanza = new pgBackRest::Stanza();
#---------------------------------------------------------------------------------------------------------------------------
$self->testResult(sub {$oStanza->stanzaUpgrade()}, 0, 'successfully upgraded');
#---------------------------------------------------------------------------------------------------------------------------
$self->testResult(sub {$oStanza->stanzaUpgrade()}, 0, 'upgrade not required');
}
################################################################################################################################
if ($self->begin("Stanza::upgradeCheck"))
{
logDisable(); $self->configLoadExpect(dclone($oOption), CMD_STANZA_UPGRADE); logEnable();
my $oStanza = new pgBackRest::Stanza();
# Create the archive file with current data
my $oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($self->{strArchivePath}, false);
$oArchiveInfo->create('9.4', 6353949018581704918, true);
# Create the backup file with outdated data
my $oBackupInfo = new pgBackRest::BackupInfo($self->{strBackupPath}, false, false);
$oBackupInfo->create('9.3', 6999999999999999999, '937', '201306121', true);
# Confirm upgrade is needed for backup
$self->testResult(sub {$oStanza->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_BACKUP_MISMATCH)}, true,
'backup upgrade needed');
$self->testResult(sub {$oStanza->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ARCHIVE_MISMATCH)}, false,
'archive upgrade not needed');
# Change archive file to contain outdated data
$oArchiveInfo->create('9.3', 6999999999999999999, true);
# Confirm upgrade is needed for both
$self->testResult(sub {$oStanza->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ARCHIVE_MISMATCH)}, true,
'archive upgrade needed');
$self->testResult(sub {$oStanza->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_BACKUP_MISMATCH)}, true,
'backup upgrade needed');
# Change the backup file to contain current data
$oBackupInfo->create('9.4', 6353949018581704918, '942', '201409291', true);
# Confirm upgrade is needed for archive
$self->testResult(sub {$oStanza->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_BACKUP_MISMATCH)}, false,
'backup upgrade not needed');
$self->testResult(sub {$oStanza->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ARCHIVE_MISMATCH)}, true,
'archive upgrade needed');
#---------------------------------------------------------------------------------------------------------------------------
# Perform an upgrade and then confirm upgrade is not necessary
$oStanza->process();
$oArchiveInfo = new pgBackRest::Archive::ArchiveInfo($self->{strArchivePath});
$oBackupInfo = new pgBackRest::BackupInfo($self->{strBackupPath});
$self->testResult(sub {$oStanza->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ARCHIVE_MISMATCH)}, false,
'archive upgrade not necessary');
$self->testResult(sub {$oStanza->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_BACKUP_MISMATCH)}, false,
'backup upgrade not necessary');
#---------------------------------------------------------------------------------------------------------------------------
# Change the DB data
$oStanza->{oDb}{strDbVersion} = '9.3';
$oStanza->{oDb}{ullDbSysId} = 6999999999999999999;
# Pass an expected error that is different than the actual error and confirm an error is thrown
$self->testException(sub {$oStanza->upgradeCheck($oArchiveInfo, PATH_BACKUP_ARCHIVE, ERROR_ASSERT)}, ERROR_ARCHIVE_MISMATCH,
"WAL segment version 9.3 does not match archive version 9.4\n" .
"WAL segment system-id 6999999999999999999 does not match archive system-id 6353949018581704918\n" .
"HINT: are you archiving to the correct stanza?");
$self->testException(sub {$oStanza->upgradeCheck($oBackupInfo, PATH_BACKUP_CLUSTER, ERROR_ASSERT)}, ERROR_BACKUP_MISMATCH,
"database version = 9.3, system-id 6999999999999999999 does not match backup version = 9.4, " .
"system-id = 6353949018581704918\nHINT: is this the correct stanza?");
}
}
1;

View File

@@ -0,0 +1,163 @@
####################################################################################################################################
# StanzaUpgradeTest.pm - Tests for stanza-upgrade command
#
# db-catalog-version=201510051
# db-control-version=942
# db-system-id=6392579261579036436
# db-version="9.5"
####################################################################################################################################
package pgBackRestTest::Stanza::StanzaUpgradeTest;
use parent 'pgBackRestTest::Common::Env::EnvHostTest';
####################################################################################################################################
# Perl includes
####################################################################################################################################
use strict;
use warnings FATAL => qw(all);
use Carp qw(confess);
use File::Basename qw(dirname);
use pgBackRest::Archive::ArchiveInfo;
use pgBackRest::BackupInfo;
use pgBackRest::DbVersion;
use pgBackRest::Common::Exception;
use pgBackRest::Common::Ini;
use pgBackRest::Common::Log;
use pgBackRest::Common::Wait;
use pgBackRest::Config::Config;
use pgBackRest::File;
use pgBackRest::FileCommon;
use pgBackRest::InfoCommon;
use pgBackRest::Manifest;
use pgBackRestTest::Common::Env::EnvHostTest;
use pgBackRestTest::Common::ExecuteTest;
use pgBackRestTest::Common::RunTest;
####################################################################################################################################
# run
####################################################################################################################################
sub run
{
my $self = shift;
for (my $bRemote = false; $bRemote <= true; $bRemote++)
{
# Increment the run, log, and decide whether this unit test should be run
if (!$self->begin($bRemote ? "remote" : "local")) {next}
# Create hosts, file object, and config
my ($oHostDbMaster, $oHostDbStandby, $oHostBackup, $oFile) = $self->setup(
true, $self->expect(), {bHostBackup => $bRemote});
# Create the test path for pg_control
filePathCreate(($oHostDbMaster->dbBasePath() . '/' . DB_PATH_GLOBAL), undef, false, true);
# Copy pg_control for stanza-create
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_93 . '.bin ' . $oHostDbMaster->dbBasePath() . '/' .
DB_FILE_PGCONTROL);
# Create the xlog path for pushing WAL
my $strXlogPath = $oHostDbMaster->dbBasePath() . '/pg_xlog';
filePathCreate($strXlogPath, undef, false, true);
my $strArchiveTestFile = $self->dataPath() . '/backup.wal1_';
# Attempt an upgrade before stanza-create has been performed
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaUpgrade('fail on stanza not initialized since archive.info is missing',
{iExpectedExitStatus => ERROR_FILE_MISSING, strOptionalParam => '--no-' . OPTION_ONLINE});
# Create the stanza successfully without force
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaCreate('successfully create the stanza', {strOptionalParam => '--no-' . OPTION_ONLINE});
# Perform a stanza upgrade which will indicate already up to date
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaUpgrade('already up to date', {strOptionalParam => '--no-' . OPTION_ONLINE});
# Fail upgrade when backup.info missing
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->executeSimple('rm ' . $oFile->pathGet(PATH_BACKUP_CLUSTER, FILE_BACKUP_INFO));
$oHostBackup->stanzaUpgrade('fail on stanza not initialized since backup.info is missing',
{iExpectedExitStatus => ERROR_FILE_MISSING, strOptionalParam => '--no-' . OPTION_ONLINE});
# Create the stanza successfully with force
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaCreate('use force to recreate the stanza',
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
# Fail on archive push due to mismatch of DB since stanza not upgraded
#--------------------------------------------------------------------------------------------------------------------------
# Push a WAL segment so have a valid file in archive dir
# $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_93 . '.bin', 1);
# Upgrade the DB by copying new pg_control
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_94 . '.bin ' . $oHostDbMaster->dbBasePath() . '/' .
DB_FILE_PGCONTROL);
executeTest('sudo chmod 600 ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);
# Fail on attempt to push an archive
$oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1, ERROR_ARCHIVE_MISMATCH);
# Perform a successful stanza upgrade noting additional history lines in info files for new version of the database
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->stanzaUpgrade('successful upgrade creates mismatched files', {strOptionalParam => '--no-' . OPTION_ONLINE});
# After stanza upgrade, make sure archives are pushed to the new db verion-id directory (9.4-2)
#--------------------------------------------------------------------------------------------------------------------------
# Push a WAL segment so have a valid file in the latest DB archive dir only
$oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_94 . '.bin', 1);
$self->testResult(
sub {$oFile->list(PATH_BACKUP_ARCHIVE, PG_VERSION_94 . '-2/0000000100000001')},
"000000010000000100000001-1e34fa1c833090d94b9bb14f2a8d3153dca6ea27.$oFile->{strCompressExtension}",
'check that WAL is in the archive at -2');
# Create a DB history mismatch between the info files
#--------------------------------------------------------------------------------------------------------------------------
# Remove the archive info file and force reconstruction
$oHostBackup->executeSimple('rm ' . $oFile->pathGet(PATH_BACKUP_ARCHIVE, ARCHIVE_INFO_FILE));
$oHostBackup->stanzaCreate('use force to recreate the stanza producing mismatched info history but same current db-id',
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
# Create a DB-ID mismatch between the info files
#--------------------------------------------------------------------------------------------------------------------------
$oHostBackup->executeSimple('rm ' . $oFile->pathGet(PATH_BACKUP_CLUSTER, FILE_BACKUP_INFO));
$oHostBackup->stanzaCreate('use force to recreate the stanza producing mismatched db-id',
{strOptionalParam => '--no-' . OPTION_ONLINE . ' --' . OPTION_FORCE});
# Confirm successful backup at db-1 although archive at db-2
#--------------------------------------------------------------------------------------------------------------------------
# Create the tablespace directory and perform a backup
filePathCreate($oHostDbMaster->dbBasePath() . '/' . DB_PATH_PGTBLSPC);
$oHostBackup->backup('full', 'create first full backup ', {strOptionalParam => '--retention-full=2 --no-' .
OPTION_ONLINE . ' --log-level-console=detail'}, false);
# Test archive dir version XX.Y-Z ensuring sort order of db ids is reconstructed correctly from the directory db-id value
#--------------------------------------------------------------------------------------------------------------------------
# Create the 10.0-3 directory and copy a WAL file to it (something that has a different system id)
$oHostBackup->executeSimple('mkdir ' . $oFile->pathGet(PATH_BACKUP_ARCHIVE) . '/' . '10.0-3');
$oHostBackup->executeSimple('mkdir ' . $oFile->pathGet(PATH_BACKUP_ARCHIVE) . '/' . '10.0-3/0000000100000001');
$oHostBackup->executeSimple('cp ' . $self->dataPath() . '/backup.wal1_' . WAL_VERSION_92 . '.bin '
. $oFile->pathGet(PATH_BACKUP_ARCHIVE) . '/' . '10.0-3/0000000100000001/000000010000000100000001');
# Copy pg_control for 9.5
executeTest(
'cp ' . $self->dataPath() . '/backup.pg_control_' . WAL_VERSION_95 . '.bin ' . $oHostDbMaster->dbBasePath() . '/' .
DB_FILE_PGCONTROL);
executeTest('sudo chmod 600 ' . $oHostDbMaster->dbBasePath() . '/' . DB_FILE_PGCONTROL);
$oHostBackup->stanzaUpgrade('successfully upgrade with XX.Y-Z', {strOptionalParam => '--no-' . OPTION_ONLINE});
# Push a WAL and create a backup in the new DB to confirm info command displays the JSON correctly
#--------------------------------------------------------------------------------------------------------------------------
$oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile . WAL_VERSION_95 . '.bin', 1);
$oHostBackup->backup('full', 'create second full backup ', {strOptionalParam => '--retention-full=2 --no-' .
OPTION_ONLINE . ' --log-level-console=detail'}, false);
$oHostDbMaster->info('db upgraded - db-1 and db-2 listed', {strOutput => INFO_OUTPUT_JSON});
}
}
1;