mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-01-18 04:58:51 +02:00
Implement issue #130: Info files should be updated with new version when pgBackRest is upgraded.
This commit is contained in:
parent
59b2261a8e
commit
b17bf31fb6
@ -105,6 +105,12 @@ sub new
|
||||
{
|
||||
confess &log(ERROR, "format of ${strFileName} is ${iFormat} but " . BACKREST_FORMAT . ' is required', ERROR_FORMAT);
|
||||
}
|
||||
|
||||
# Check if the version has changed
|
||||
if (!$self->test(INI_SECTION_BACKREST, INI_KEY_VERSION, undef, BACKREST_VERSION))
|
||||
{
|
||||
$self->set(INI_SECTION_BACKREST, INI_KEY_VERSION, undef, BACKREST_VERSION);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -984,6 +984,10 @@ sub BackRestTestBackup_Test
|
||||
BackRestTestBackup_ManifestFileCreate(\%oManifest, "tablespace/2", 'tablespace2b.txt', 'TBLSPC2B',
|
||||
'e324463005236d83e6e54795dbddd20a74533bf3', $lTime);
|
||||
|
||||
# Munge the version to make sure it gets corrected on the next run
|
||||
BackRestTestBackup_ManifestMunge($oFile, $bRemote, $strBackup, INI_SECTION_BACKREST, INI_KEY_VERSION, undef,
|
||||
'0.00');
|
||||
|
||||
$strBackup = BackRestTestBackup_BackupSynthetic($strType, $strStanza, $bRemote, $oFile, \%oManifest,
|
||||
'add files and remove tablespace 2');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user