1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2026-05-22 10:15:16 +02:00

Fixed the backup command so the backup-standby option is reset (and the backup proceeds on the master) if the standby is not configured and/or reachable.

Fixed by Cynthia Shang.
This commit is contained in:
Cynthia Shang
2017-05-12 16:05:44 -04:00
committed by David Steele
parent 5bf4f52e3d
commit 7d0c50fcd6
7 changed files with 346 additions and 27 deletions
@@ -210,9 +210,6 @@ sub run
# Check backup mismatch error
$strComment = 'fail on backup info mismatch';
# First run a successful backup to create the backup.info file
$oHostBackup->backup($strType, 'run a successful backup');
# Load the backup.info file and munge it for testing by breaking the database version and system id
$oHostBackup->infoMunge(
$oFile->pathGet(PATH_BACKUP_CLUSTER, FILE_BACKUP_INFO),
@@ -1145,6 +1145,15 @@ sub run
strOptionalParam => '--protocol-timeout=2 --db-timeout=.5 --log-level-console=warn',
strTest => TEST_BACKUP_STOP, fTestDelay => 2, bSupplemental => false});
}
# Test backup from standby warning that standby not configured so option reset
#-----------------------------------------------------------------------------------------------------------------------
if (!defined($oHostDbStandby) && $bNeutralTest)
{
$strBackup = $oHostBackup->backup(
$strType, 'option backup-standby reset - backup performed from master', {oExpectedManifest => \%oManifest,
strOptionalParam => '--log-level-console=detail --' . OPTION_BACKUP_STANDBY});
}
}
}
}