postgres-backup-s3 icon indicating copy to clipboard operation
postgres-backup-s3 copied to clipboard

Support for smart file retention (Days, Weeks, Months)

Open petre-c opened this issue 2 years ago • 2 comments

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

petre-c avatar Oct 05 '23 07:10 petre-c

🖐🏽

petre-c avatar Oct 13 '23 08:10 petre-c

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

vertex-github avatar Oct 19 '23 11:10 vertex-github