a month ago
I am about to shutdown my services for now and I need to backup everything so that I can keep it local until I decide to spin it back up. How do I do that. The AI agent is not helping and I've tried to use the railway cli but it gives me an error and it doesn't allow me to download everything at one.
Any help would be appreciated
2 Replies
a month ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 1 month ago
a month ago
If you want to download a local copy of certain files from a volume, you can achieve this by going to the Console tab of your service, from there you can use a command line tool like zip (or any other alternative) to zip/compress an entire folder, and use the file browser (also in the Console tab) to download it. Otherwise, you still have Railway backups that you can use: https://docs.railway.com/volumes/backups
a month ago
There isn’t really a one-click “export the whole Railway project” command. I’d back it up in separate pieces before shutting anything down.
For the Railway config, save:
railway status --json > railway-status.json
railway environment config --json > railway-config.json
For each service I’d also export the variables:
railway variable list --kv -s my-service > my-service.env
Volumes can now be downloaded directly with the CLI, so you don’t need to zip them manually in the container:
railway volume files --volume my-volume download / ./my-volume-backup
For Postgres, don’t rely only on Railway volume backups if you plan to remove the project. Make a local pg_dump as well. Railway’s own docs point out that a logical dump is the portable backup that can be restored somewhere else later.
So basically: keep the source repo, export config + env vars, download every volume, and dump every database. Once those are safely local, you should have everything important needed to recreate the project later.