pgbackrest
pgbackrest copied to clipboard
WIP: Allow zero repo-archive-retention
There are some valid use-cases where someone might want to disable archiving for a specific repository.
With repo-retention-archive set to 0, the archives are pushed only when the check or backup commands are running. That required to add a check lock.
For the multi-repo context, I added the repoIdx into the backup lock, using that info to skip archiving on disabled repos (except the one where the backup is running). Choosing this path could let us add more info to the lock file later if we want.
Imho, since backupStart happens after the lock update inside the backup command, archive-push wouldn't skip archiving the starting wal but I might not be imaginative enough :thinking:
Previously the expire command kept all archives after the newest backup. If i.e. the check command is executed, we'd have a broken chain of archives in the disabled repo. So I've updated the expire command to be able to remove those.
If this seems like a good approach, I'll gladly add the tests :wink:
Many thanks in advance for the review and advice :blush:
Hi, can i please get an update on this patch . This feature is crucial to my long term backup setup.
Hi, can i please get an update on this patch.
@vkaplan40 This patch requires a new locking scheme and I have not come up with anything I'm happy with. I'm planning to look at locking again in the next release or two, but no guarantees.
@dwsteele - if I can add my vote here, we REALLY need this feature!!!