MySQL With Backups

a year ago

Description: The standard MySQL database plus backups to Cloudflare R2

Category: Storage

URL: https://railway.app/template/xNTYS8

3 Replies

a year ago

I think backup services should stay as add-ons instead of coming with databases, and popular database services should stay as railway templates only.


a year ago

The backup service is also available as a standalone template (https://railway.app/template/7GOA4r). This one uses the official Railway MySQL template and adds in the other service with the template composer—so it's not a new MySQL template, just an easier way to deploy them (with the variable references working correctly).

It would be cool if Railway added a way to create a template which is defined as an addon to another template. So you could click on your MySQL service, then select from the available addons to find a backup strategy that works for you, and have it automatically connect the relevant variables 🤔.


a year ago

While Railway doesn't have a way to do exactly what you said, 90% of it can be achieved with reference variables, a good example of this would be the pgbouncer template https://railway.app/template/OpUzwe

It's set up in such a way that it assumes you have a Postgres database named Postgres in the same project, if so, it will require no additional configurations to connect. Check out its variables!

So with all that said, I think it would be best for you to only keep up the other stand-alone template instead of this template that includes the database.