Recovering the source snapshot from a past build (GitHub repo deleted)
thibmonier
PROOP

a month ago

My GitHub repo thibmonier/agir-poc was deleted and is past GitHub's 90-day restore window. It was the only copy of my Angular frontend sources — no local copy, no backup.

The build logs show Railway still fetches a source snapshot for this service on every redeploy:

fetched snapshot sha256:04b3d3316d789b1e3671294e0d2621b009435b3bede1693b5488094a89dddf3a (2.5 MB)

The deployed image is a multi-stage nginx build, so only dist/ survives — I've already extracted that over railway ssh. The sources only exist in that build snapshot.

Would someone be able to retrieve that snapshot archive for me?

  • Project: illustrious-freedom (9cca8f36-d7db-4b11-8997-09e662a5c8bf)
  • Service: bountiful-strength (b2d0b2e8-c2eb-47d3-ac7c-99687d3affb6), env frontend
  • Deployment: 2fcfbb82-40b0-4270-8c56-1836ff80bcf1
  • Backend service agir-poc (f2023f3d-2b65-45e8-8134-c4da69eac715) holds a second snapshot of the same repo, deployment b9ecefeb-0269-4d2c-bdb9-48361274d872.

I've frozen both services (auto-deploy off) so the snapshots aren't overwritten. Thanks.

Solved

2 Replies

Status changed to Awaiting Railway Response Railway • 27 days ago


Railway
BOT

a month ago

Retrieving build snapshots or container images isn't something we're able to do, and that applies to both services regardless of the deployment IDs or digests identified. The one path is whatever survives in the running container itself, accessible via railway ssh or the service's Console tab. Your frontend service uses a multi-stage Dockerfile so only the final nginx stage is present, as you found. However, your backend service (agir-poc) is built with Railpack, not a multi-stage Dockerfile, so the full repo source should still be on disk inside that running container. You can shell in with railway ssh and use tar piped through base64 to pull the files out, since there is no SCP/SFTP.


Status changed to Awaiting User Response Railway • 27 days ago


Status changed to Awaiting Railway Response Railway • 27 days ago


Railway
BOT

a month ago

To correct our earlier reply, we do support SCP and SFTP, so the tar-and-base64 workaround is unnecessary. The easiest extraction path for the backend service (which uses Railpack, not a multi-stage Dockerfile, so the full repo source should be on disk) is railway service files download /app ./local-dir from the CLI, which pulls a whole directory in one step. You can also use scp -r against ssh.railway.com with an SSH key registered on your account, or browse and download files from the service's Console tab in the dashboard. Retrieving the build snapshot itself isn't something we're able to do, regardless of the deployment or digest identified.


Status changed to Awaiting User Response Railway • 27 days ago


Railway
BOT

20 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 20 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...