with recovering volume from crashed postgres service
roycris
HOBBYOP

a month ago

My Postgres service has been crash-looping since May 20 ~04:29 UTC with catatonit: failed to exec pid1: No such file or directory. I have stood up a new Postgres instance (Postgres-SD0C) as a temporary measure but need to recover data from the original volume. Service ID: 6a4e19e9-1db4-4339-888b-4901a9fb4910, Replica: 5f76e753-488c-49ff-bb8a-26d94f4c7acb, Volume: vol_kx948jucc3avasem, project: gregarious-vibrancy. Please help recover the volume data or fix the original service so I can pg_dump the database before migrating to the new instance."

Thank you

$10 Bounty

3 Replies

Railway
BOT

a month ago

This crash is caused by a stale container image, and per our records the volume data remains intact through this error. You can fix the original service by opening it, pressing Cmd+K (or Ctrl+K) to open the command palette, and selecting "Redeploy source image" - a normal redeploy from the 3-dot menu will not work since it doesn't re-pull the image. Once the service is back up, you can run your pg_dump against it before migrating to the new instance.


Status changed to Awaiting User Response Railway about 2 months ago


Railway

This crash is caused by a stale container image, and per our records the volume data remains intact through this error. You can fix the original service by opening it, pressing Cmd+K (or Ctrl+K) to open the command palette, and selecting "Redeploy source image" - a normal redeploy from the 3-dot menu will not work since it doesn't re-pull the image. Once the service is back up, you can run your pg_dump against it before migrating to the new instance.

roycris
HOBBYOP

a month ago

Thank you, the redeploy source image worked. The original service is back up. Could you please run a pg_dump of the railway database on service 6a4e19e9-1db4-4339-888b-4901a9fb4910 and restore it to my new Postgres-SD0C service? I don't have pg_dump available locally. Destination public URL: kodama.proxy.rlwy.net:38765


Status changed to Awaiting Railway Response Railway about 2 months ago


Status changed to Open Railway about 2 months ago


a month ago

Railway/community cannot really run the pg_dump for you from here, but you can do it without having pg_dump locally.

create a temporary service from a postgres image, put both DB URLs as variables, then run the dump from inside Railway network:

pg_dump "$OLD_DATABASE_URL" | psql "$NEW_DATABASE_URL"

do it old -> new, and keep the original volume/service untouched until you confirm row counts on the new DB. if the new DB already has partial data, restore into a fresh empty DB to avoid duplicate/schema weirdness.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...