a month ago
I have a restored volume named:
postgres-2026-06-24 00:10 UTC
It is currently READY / unattached.
I created a new temporary PostgreSQL service:
ikiyu-postgres-restore-test-20260625
The goal is to attach the restored volume to this temporary
PostgreSQL service in order to verify backup integrity without
affecting production.
Railway Support previously indicated that this should be done
by selecting the restored volume in the temporary service's
volume settings. However, in the current dashboard UI, the
temporary PostgreSQL service does not show a "Volumes" section
in Settings, and I cannot find an option to attach an existing
unattached volume.
Questions:
-
How do I attach an existing unattached restored volume to
a new temporary PostgreSQL service in the current Railway
dashboard?
-
Is this action only available through Railway CLI?
-
If CLI is required, what exact command should be used?
-
What service ID, environment ID, volume ID, and mount path
are required?
-
Should the mount path be /var/lib/postgresql/data for the
Railway PostgreSQL image?
-
How do we ensure the temporary service does not initialize
a new empty database over the restored volume?
-
Is there any risk of data overwrite when attaching the
restored volume to a fresh PostgreSQL service?
-
Should the default volume of the temporary PostgreSQL
service be removed first?
-
What is the safest supported procedure to test a restored
PostgreSQL backup volume without replacing production?
Important context:
-
Production PostgreSQL is healthy.
-
Production uses postgres-volume.
-
The restored volume is not mounted to production.
-
We do not want to modify production.
-
We do not want to change DATABASE_URL.
-
We do not want to overwrite or initialize the restored volume.
-
We only want to mount the restored volume to an isolated
temporary service and run read-only integrity checks.
Project: beneficial-dedication
Environment: production
Production service: Postgres
Temporary service: ikiyu-postgres-restore-test-20260625
Restored volume: postgres-2026-06-24 00:10 UTC
1 Replies
a month ago
This thread has been opened as a public bounty so the community can help solve it. The thread and any further activity are now visible to everyone.
Status changed to Open Railway • about 1 month ago
a month ago
You can drag the unattached volume over the Postgres service in the dashboard to execute a volume swap. Keep in mind that you may encounter authentication errors. If you do, follow the steps below:
- Click into your database service and go to the console tab
- Run this command:
sed -i 's/host all all all scram-sha-256/host all all ::\/0 trust/' /var/lib/postgresql/data/pgdata/pg_hba.conf(This will bypass user authentication) - Redeploy your database
- SSH again, and run the command
psql - Run
ALTER USER postgres with password '<PASSWORD>';where<PASSWORD>is the value of the variablePGPASSWORDin your Railway dashboard - Type
exit - Run
sed -i 's/host all all ::\/0 trust/host all all all scram-sha-256/' /var/lib/postgresql/data/pgdata/pg_hba.conf(This will re-enable user authentication) - Redeploy your database