postgres-backup-s3
postgres-backup-s3 copied to clipboard
Support for smart file retention (Days, Weeks, Months)
Would it make sense to add support and configuration options for keeping backups for Days, Weeks, Months? This is a repo based on current - https://github.com/prodrigestivill/docker-postgres-backup-local which provides these capabilities, so it should be straightforward to implement.
I've also asked this question in the other tool's discussion - https://github.com/prodrigestivill/docker-postgres-backup-local/discussions/93#discussioncomment-7195121
🖐🏽
Related - how about a smart retention policy like this: https://forum.duplicati.com/t/new-retention-policy-deletes-old-backups-in-a-smart-way/2195
This keeps 1d for 7d, 1/wk for 4wks, and then keeps 1/mth for 12 months. - that would be great - i dont need daily backups of my DB going back an entire year, but I would like one to be automatically retained from a few months ago. Perhaps before deleting the 8d old backup, it gets moved to the ./weekly/folder and then we run the same detection algo on that folder, moving the oldest one (beyond 4 weeks) to the ./monthly folder, and then the same again for that folder, moving the oldest monthly to ./yearly - same algo invoked 3 times on ./backup, ./backup/weekly, ./backup-monthly