Error: Cannot restore to existing database name in Railway
0 reputation · 06 Sept 2021, 19:06 UTC
Goal
To recover a Railway-managed PostgreSQL database from a point‑in‑time backup and have the restored instance replace the current database without creating a new database name.
Constraints
Railway’s restore operation always creates a new database instance; the dashboard and CLI do not expose an option to overwrite an existing database. The only documented approach is to delete or rename the existing instance before initiating a restore, which introduces potential data loss or naming conflicts.
Uncertainty
There is no official guidance on how to safely perform an in‑place replacement, nor on whether Railway will support such a feature in future releases. Verification of data integrity after restoration relies on external checksum or sample query comparisons, but the platform offers no built‑in verification tool.
Questions
- Does Railway plan to add an in‑place restore option that preserves the original database name?
- If not, what is the recommended safe sequence for renaming or dropping the current instance before restoration?
- Will future backup retention policies affect the ability to restore to a new instance that matches the previous name?