Restore a database during rollback
Return a site's database to a recovery point while you roll back, and undo the restore within 7 days.
Roll the site back, then choose the option that restores the database.
Before you start
- You are an Owner or Admin, or your custom role holds
restores:write. A Developer can still confirm a code-only rollback after the warning. See Roles and permissions. - You signed in within the last 30 minutes. An API token cannot restore.
- The restore returns the database to a recovery point. Content and settings saved after that point are lost, and files in R2 are not restored.
- For up to 10 minutes, visitors see a maintenance page that answers every request with a 503. The site's scheduled work pauses meanwhile.
- Fleet restores sites it created only. It never changes the database of a linked site.
- Cloudflare allows 10 restores per 10 minutes for one database. See D1 Time Travel.
Steps
- Open the site and select Rollback next to the version you want. See Roll back to a previous version.
- When the dialog warns that later versions changed the database, choose the option that restores it. It uses the earliest recovery point recorded since that version, and shows its date.
- Type the name of the site to confirm.
- Follow the job page. Fleet puts a maintenance version live, restores the database, puts the chosen version live and checks the site.
- When the job ends, open the site. If it shows Setup not finished, open the admin and finish the setup.
- To go back, select Undo restore on the site page within 7 days of the restore, and type the site name.

Result
- The database is at the recovery point and the chosen version is live.
- Undo restore returns the database to how it was before the restore started and puts the previous version live. An undo can be undone in the same way.
If something goes wrong
If your last sign-in is more than 30 minutes old, Fleet takes you to sign in again, with no message. Sign in, then repeat the action.
The dialog or the job page shows one of these messages.
Fleet could not confirm the restore, so your previous version is live again. Check your content. Undo restore returns the database to how it was before the restore started.
The restore ran, but Fleet could not put your version live and check it, so the site may still show the maintenance page. Retry puts your version live. It does not restore the database again.
A Fleet maintenance restore interrupted this job. Retry it. For a database export, start a new export from the site page.
Fleet stopped this job because it stopped responding. Retry it. For a database export, start a new export from the site page. If it repeats, contact support and quote job <id>.
No recovery point is known to come before the database changes made since this version, so Fleet cannot restore its database.
Read Rollback asks for a database restore. Never send a token, a password or an API key to support.