13 days ago
Hi, I need urgent help. While trying to recover my "web" service, I accidentally used "Swap Volume" on all my Postgres databases (Umayor, PRUEBA, Mitigo-master), leaving them pointing to wrong/empty volumes. I then ran several restores, and now "Umayor" won't stay online: it boots with data present ("PostgreSQL Database directory appears to contain a database; Skipping initialization") but crashes with password authentication failed for user "postgres" and data directory lock file is invalid / could not open postmaster.pid.
What I need: restore my databases (especially Umayor) to the most recent stable state you can recover — I don't need an exact date, just the latest consistent version available. PITR was OFF, and my most recent manual backup is 2026-06-22 20:24 (229 MB).
Please help me: (1) identify the volume/backup with my newest usable data, (2) reconnect it to the correct service, and (3) reset the postgres role password so the service stays online.
Project: 3c6d9775-574f-42db-bebb-6ea7caa50bfd
Services: Umayor, PRUEBA, Mitigo-master, web
Pinned Solution
12 days ago
Try this to fix the auth errors:
- 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
1 Replies
13 days 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 • 13 days ago
12 days ago
Try this to fix the auth errors:
- 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
Status changed to Solved ernestojaviern • 12 days ago