Production PostgreSQL data wiped
yousefnijim
HOBBYOP

a month ago

Hi,

I need urgent help recovering data on my Postgres database.

Service: Postgres (host: zephyr.proxy.rlwy.net:22870, database: railway)

Project: shu-abalak

What happened:

While running prisma migrate diff locally against our production

database, we mistakenly passed our REAL production DATABASE_URL as the

--shadow-database-url parameter. Prisma's shadow-database mechanism

treats whatever URL is passed there as disposable — it drops and rebuilds

the schema from migration history to compute a diff. We believe this

caused Prisma to DROP and recreate every table in our production database.

Current state (confirmed via read-only queries just now):

  • All 37 tables still exist with the correct schema structure (all 44

    migrations show as applied)

  • But every single table is completely empty — 0 rows in users,

    businesses, orders, areas, everything

Before this happened, this database had real data (confirmed by our own

checks in recent days): approximately 31 users, 22 businesses, 28 areas,

and order history including at least 13 cancelled orders, plus normal

day-to-day production traffic.

What I need:

Do you have Point-in-Time Recovery (PITR) or WAL-based recovery available

for this database, even if it's not visible under the "Backups" tab in

the dashboard? I need to restore to a point in time BEFORE today

17.07.2026 17:00 PM, ideally as close as possible to

just before this incident.

This is time-sensitive — please let me know as soon as possible if

recovery is possible, and what I need to do on my end.

Thank you.

Solved

1 Replies

Railway
BOT

a month ago

Our databases are unmanaged, so automatic snapshots, WAL recovery, and PITR aren't available unless you set up volume backups or PITR yourself. We don't recover data lost to user-initiated actions. Going forward, enable volume backups on your stateful services so you can self-restore if this happens again.


Status changed to Awaiting User Response Railway about 1 month ago


Railway
BOT

a month 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 28 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...