SYNC DATA FROM MY PROD ENV TO QA each week

bruzii
PROOP

22 days 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 ?

$10 Bounty

6 Replies

Railway
BOT

22 days 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!


sarahkb125
EMPLOYEE

22 days 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 22 days ago


Status changed to Solved sarahkb125 22 days 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

bruzii
PROOP

21 days 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 21 days ago


21 days 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 21 days ago


21 days 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.

bruzii
PROOP

21 days 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.

21 days 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.


Loading...