You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-07-13 01:00:23 +02:00
Allow repo-hardlink option to be changed after full backup.
This rule was added because there were not sufficient tests to demonstrate that the repo-hardlink option could be changed in a backup set. Remove the restriction and add/update tests to show that it works. This is necessary now because bundling requires that hardlinking be disabled. Rather than add code complexity, it seems better just to address this limitation.
This commit is contained in:
@ -960,10 +960,12 @@ sub run
|
||||
$oHostBackup->configUpdate({&CFGDEF_SECTION_GLOBAL => {'compress-type' => $strCompressType}});
|
||||
}
|
||||
|
||||
# Enable hardlinks (except for s3) to ensure a warning is raised
|
||||
# Enable hardlinks (except for s3) to show they can be enabled after a full backup
|
||||
if ($strStorage eq POSIX)
|
||||
{
|
||||
$oHostBackup->configUpdate({&CFGDEF_SECTION_GLOBAL => {'repo1-hardlink' => 'y'}});
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_HARDLINK} = JSON::PP::true;
|
||||
$oHostBackup->{bHardLink} = true;
|
||||
}
|
||||
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_PROCESS_MAX} = 1;
|
||||
@ -987,16 +989,10 @@ sub run
|
||||
#---------------------------------------------------------------------------------------------------------------------------
|
||||
$strType = CFGOPTVAL_BACKUP_TYPE_FULL;
|
||||
|
||||
# Now the compression and hardlink changes will take effect
|
||||
# Now the compression changes will take effect
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_COMPRESS} = JSON::PP::true;
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_COMPRESS_TYPE} = $strCompressType;
|
||||
|
||||
if ($strStorage eq POSIX)
|
||||
{
|
||||
$oManifest{&MANIFEST_SECTION_BACKUP_OPTION}{&MANIFEST_KEY_HARDLINK} = JSON::PP::true;
|
||||
$oHostBackup->{bHardLink} = true;
|
||||
}
|
||||
|
||||
$oHostDbPrimary->manifestReference(\%oManifest);
|
||||
|
||||
$oHostDbPrimary->manifestFileCreate(
|
||||
|
Reference in New Issue
Block a user