A preserved backup won't be automatically deleted even if it matches
the automatic deletion rules.
The backups following the preserved backup won't be deleted either.
This capability is enabled by passing the --preserve-until flag
during restoration.
Multiple preservation requests can co-exist and be separately
canceled for the same backup.
The effective preservation duration is the longest of all the
uncancelled preservation requests.
If the storage is not writable and the option was enabled, pghoard
will emit an error message but will not fail the restoration.
The preservation request is canceled at the end of the restore
operation, only if the restoration is successful..
Why this way
The request is not renewed or extended during the backup restoration.
The expectation is that the option is used with a far enough date is
the future that it's not a problem.
Using a far-future date is unlikely to cause issues during normal
operations since the request is canceled after a successful restore.
If needed, an operator could write a preservation request in the
storage from outside pghoard, pghoard will see it and honour it
About this change - What it does
A preserved backup won't be automatically deleted even if it matches the automatic deletion rules.
The backups following the preserved backup won't be deleted either.
This capability is enabled by passing the
--preserve-until
flag during restoration.Multiple preservation requests can co-exist and be separately canceled for the same backup.
The effective preservation duration is the longest of all the uncancelled preservation requests.
If the storage is not writable and the option was enabled, pghoard will emit an error message but will not fail the restoration.
The preservation request is canceled at the end of the restore operation, only if the restoration is successful..
Why this way
The request is not renewed or extended during the backup restoration. The expectation is that the option is used with a far enough date is the future that it's not a problem.
Using a far-future date is unlikely to cause issues during normal operations since the request is canceled after a successful restore.
If needed, an operator could write a preservation request in the storage from outside pghoard, pghoard will see it and honour it