Postgres Backup Retention Policy

I am planning on backing up a postgres server (running in container on Railway) to MinIO (running in container on Railway as well) with cron as the execution layer to initiate backups. Any suggestions for setting up backup retention policies so I don't fill MinIO with an unnecessary number of backup files? Hosted/managed providers like AWS RDS and Azure Database offer built-in retention control, but im not sure how to do this with self-hosted postgres & minio on railway
8 Replies
Percy
Percy2mo ago
Project ID: N/A
bc 🐧🪺
bc 🐧🪺OP2mo ago
N/A I could write a service that does this too but it would be nice not to have to code this up, curious if there's a service anyone can think of/has used that handles this kind of Postgres backup retention for you
bc 🐧🪺
bc 🐧🪺OP2mo ago
pgBackRest - Reliable PostgreSQL Backup & Restore
pgBackRest - Reliable PostgreSQL Backup & Restore
pgBackRest is a reliable backup and restore solution for PostgreSQL that seamlessly scales up to the largest databases and workloads.
bc 🐧🪺
bc 🐧🪺OP2mo ago
This looks good!
bc 🐧🪺
bc 🐧🪺OP2mo ago
GitHub
GitHub - wal-g/wal-g: Archival and Restoration for databases in the...
Archival and Restoration for databases in the Cloud - wal-g/wal-g
bc 🐧🪺
bc 🐧🪺OP2mo ago
I'll mark solved but hopefully this helps someone.
Brody
Brody2mo ago
use the template we provide and set a retention policy in minio, no need to complicate things
bc 🐧🪺
bc 🐧🪺OP2mo ago
That is what I looked into first but that is too primitive for my use case. Thanks for the suggestion! Also "complicate"? Quite the contrary imo
Want results from more Discord servers?
Add your server