Attach and detach on a soft-deleted volume didn't work as expected - could not retrieve data
Anonymous
PROOP

a month ago

Hi, we've been cleaning up our volumes and accidentally deleted a volume for a database that we were still using. Although this was DEV data, we didn't manage to re-attach the volume and would like to know for future reference what we did wrong.

What we attempted

We attaching the volume to an existing service - it was successful:

railway volume attach -v poetic-volume

but this command has no -s or --service parameter - so it could only be attached to the random service the command suggested in our case our-service

We had the following shown during railway volume list:

Volume: poetic-volume
Attached to: our-service
Mount path: /var/lib/postgresql/data
Storage used: 1689MB/50000MB
Status: Ready
Deletes on: Jul 23 2026 8:23 PM +02:00

Volume was attached, but somehow still in soft-delete mode and not browseable.

railway volume browse -v poetic-volume

and variations of railway volume files all errored. The dashboard also didn't show the volume attached to our randomly selected our-service service (despite the cli response saying otherwise). We tried both web ui redeploy and CLI command redeploy: railway redeploy --service our-service - but the volume was still inaccessible (it also wasn't visible on the web ui near this service).

Oddly enough detaching also didn't work.

railway volume attach -v poetic-volume showed:

Volume "poetic-volume" detached from service "our-service"

but subsesquent railway volume list still shows it ghost-attached to our-service.

No urgency as we managed to mitigate (lost dev data) but for future references we'd like to know how to mitigate the lack of -s (service picker) param on attach, or what is the suggested way of retrieving a soft-deleted volume (or reach it's data for manual recovery).

Thank you in advance!

Solved

2 Replies

Railway
BOT

a month ago

Once a volume is deleted, it enters a 48-hour soft-delete retention window during which the data is preserved but the volume is effectively frozen. Attaching, detaching, browsing, and file operations do not work normally on a volume in this state, which explains the "ghost" behavior you saw. The correct recovery path during that window is the restoration link sent via email to workspace admins when the volume was deleted. Using that link cancels the deletion entirely and returns the volume to its original state, after which you can work with it normally. Regarding the --service flag on railway volume attach, the CLI does support it (e.g. railway volume attach --volume my-volume --service backend), so you may want to check you're on the latest CLI version.


Status changed to Awaiting User Response Railway 28 days ago


Railway

Once a volume is deleted, it enters a 48-hour soft-delete retention window during which the data is preserved but the volume is effectively frozen. Attaching, detaching, browsing, and file operations do not work normally on a volume in this state, which explains the "ghost" behavior you saw. The correct recovery path during that window is the restoration link sent via email to workspace admins when the volume was deleted. Using that link cancels the deletion entirely and returns the volume to its original state, after which you can work with it normally. Regarding the `--service` flag on `railway volume attach`, the CLI does support it (e.g. `railway volume attach --volume my-volume --service backend`), so you may want to check you're on the latest CLI version.

Anonymous
PROOP

a month ago

Thank you!


Status changed to Awaiting Railway Response Railway 28 days ago


Status changed to Solved Railway 28 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...