1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-12-13 23:25:51 +02:00

Improved check command to run on a standby.

Only basic checks are done because pg_switch_xlog() cannot be executed on a replica.

Contributed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2016-12-21 14:35:20 -05:00
committed by David Steele
parent 974a02dbe4
commit 56144c99c0
10 changed files with 74 additions and 33 deletions

View File

@@ -2349,6 +2349,9 @@ sub backupTestRun
{
$strFullBackup = $strStandbyBackup;
}
# Confirm the check command runs without error on a standby
$oHostDbStandby->check('verify check command on standby');
}
# Execute stop and make sure the backup fails

View File

@@ -783,14 +783,17 @@ sub stanzaCreate
bLogOutput => $self->synthetic()});
# If the info file was created, then add it to the expect log
if ($self->synthetic() && fileExists($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info'))
if (defined($self->{oLogTest}) && $self->synthetic())
{
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
}
if (fileExists($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info'))
{
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/backup/' . $self->stanza() . '/backup.info');
}
if ($self->synthetic() && fileExists($self->repoPath() . '/archive/' . $self->stanza() . '/archive.info'))
{
$self->{oLogTest}->supplementalAdd($self->repoPath() . '/archive/' . $self->stanza() . '/archive.info');
if (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