a month ago
Hello,
i would like to have a mechanism that dump restore my qa from prod each week.
What do you recomand/best practice on railway ? some cron ?
6 Replies
a month ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
a month ago
I would suggest setting up a scheduled cron job to automate the weekly data dump.
Configure your production database for backups and set the cron job to execute a restore operation in the QA environment.
Best,
The Railway Team
Status changed to Awaiting User Response Railway • about 2 months ago
Status changed to Solved sarahkb125 • about 2 months ago
sarahkb125
I would suggest setting up a scheduled cron job to automate the weekly data dump.Configure your production database for backups and set the cron job to execute a restore operation in the QA environment.Best,The Railway Team
a month ago
should i need to create a separate service in my railway workspace to run this cron ?
i can't on;y add a cron in my actual backend ?
Status changed to Awaiting Railway Response Railway • about 2 months ago
a month ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • about 2 months ago
a month ago
Hey, unfortunately Railway does not have any built-in functionality for that. I see two options here:
1. Manually use the sync feature from time to time
2. Create a template of your project and use the API to deploy it. You could use the environmentDelete mutation, create a new environment with environmentCreate, and then use the templateDeployV2 to a specific environment.
passos
Hey, unfortunately Railway does not have any built-in functionality for that. I see two options here:1. Manually use the sync feature from time to time2. Create a template of your project and use the API to deploy it. You could use the environmentDelete mutation, create a new environment with environmentCreate, and then use the templateDeployV2 to a specific environment.
a month ago
Hello,
I tried the sync feature on my qa environnement but it doesn't sync the data of my db.
bruzii
Hello,I tried the sync feature on my qa environnement but it doesn't sync the data of my db.
a month ago
Unfortunately, the sync feature does not sync either data nor templates. The best option would be to dump your data from your database and then restore it.
If you're using Postgres, for the dump, you could use the following template: https://railway.com/deploy/I4zGrH. To restore it, you would need to create your own script that pulls from an S3 bucket and restores it. Railway functions are a great solution for this purpose.