20 days ago
Hi, today the variables PGUSER and PGDATABASE in my Postgres-z5RU service were accidentally cleared. This caused n8n to lose connection to the original database. The Postgres service is still online and the volume should still have the original data, but the database appears empty now. Can you help me recover the data from before today (May 20, 2026)? Service: lively-liberation / Postgres-z5RU / production. This contains important business workflows. Thank you.
3 Replies
20 days ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open Railway • 20 days ago
20 days ago
PGUSER should be ${{POSTGRES_USER}}; PGDATABASE should be ${{POSTGRES_DB}}.
POSTGRES_USER should be postgres, while POSTGRES_DB is railway.
20 days ago
Thank you. I have set those variables but the database appears empty now - there are no tables. The original data with my n8n workflows was there before today. Is there any way to recover the data from before the variables were cleared? The volume is still attached to the service.
16 days ago
clearing PGUSER / PGDATABASE probably did not delete the volume, but it may have made n8n connect to a different database inside the same Postgres instance.
I would connect with the postgres/superuser creds and list databases first:
psql "$DATABASE_URL" -c "\l"then inspect tables in the likely DB:
psql "$DATABASE_URL" -d railway -c "\dt *.*"for n8n you are looking for tables like workflow_entity, credentials_entity, execution_entity. if those tables are in another DB/schema, point n8n back there. if they are actually gone from the volume, then you need a backup/PITR; changing PGUSER/PGDATABASE alone wont roll data back.