Roll back a deploy
Put an earlier deploy back live in seconds, with or without the database it ran on.
Key takeaways
- Code only puts the older build back and leaves the database as it is.
- Code and database also restores the snapshot taken before a newer deploy ran migrations.
- Rows written since that snapshot are lost, and the dialog says so before you confirm.
Find the deploy
Open the project's Deploys tab. Every deploy keeps its own URL, so you can check an older one before going back to it. Choose Roll back to this from its menu.
Pick what to restore
The dialog offers Code only, or Code and database. The second one is there when a newer deploy snapshotted the database before it migrated; otherwise it's disabled and says why.
- dpl_8f31Ran 2 migrations, 6.1% errorsToday, 11:04Live
- dpl_7c20Last good deployOct 29, 16:40
Roll back to dpl_7c20
Watch it switch
A rollback is a new deploy that puts the earlier one back. Its row shows Switching, then Live. It's recorded in History, and you can roll it back the same way.
Backups
Paid projects back up their database every day at 03:00 UTC and before any deploy that runs migrations. Restore one from the Database tab, or download a dump: the link works for 1 hour.