R
Railway15mo ago
sambhav

Automated Postgres backup onto a volume ?

Since now the project I was developing for a while is almost ready for production, we need to make sure that we take automatic DB backups everyday. I found this article on blog which shows how to do it with an S3 bucket - https://blog.railway.app/p/automated-postgresql-backups My question is though, Since my client does not already have an AWS account, and since now there are volumes support available from Railway, will the following solution work ? Create a new service and mount a volume to it. Run that new service on a CRON. Within that service, take database dumps and store it onto the volume ? Some things I haven't thought about - How to actually restore from backups? how to download the backup (if needed) to local machine. Keep only last N backups and delete the older ones (All of the above are possible with S3 already).
Railway Blog
Automated PostgreSQL Backups
A step-by-step guide on automatic PostgreSQL backups on Railway using a one-click template.
3 Replies
Percy
Percy15mo ago
Project ID: 20f1c8cb-7c67-4474-a8e7-7f50a349d80f
sambhav
sambhav15mo ago
20f1c8cb-7c67-4474-a8e7-7f50a349d80f
Brody
Brody15mo ago
there's a few templates that do automatic database backups, I think at least one of them backups to the volume, to access the dump you'd need to use something like this https://railway.app/template/guiCBv which was specifically designed for this type of scenario. but the template from the blog you linked should be able to work with an S3 compatible service like cloudflare r2, I can totally understand not wanting to have an aws account, but you might already have a cloudflare account! so give that a try
Want results from more Discord servers?
Add your server