In-place restore is available for every database. To load a dump from
somewhere else, download the backup and
restore your own dump.
Before you start
- Only the database owner (or an admin, in the dashboard) can restore.
- Pick a backup that is listed for the database and is less than 30 days old; see Backups and retention.
- Expect a short cutover. Open connections are dropped and your app must reconnect. Plan a quiet moment or a maintenance window.
From the dashboard
- Open the database and go to Backups.
- Choose Restore on a verified backup.
- Confirm. The page shows progress until the operation finishes.
With the API
API access requires Pro or Business. The additional-roles and managed SQL roles routes also need a full-account API key; a key scoped to selected databases gets403 KEY_SCOPE_DENIED. List backups first to find the filename and,
where present, the backup id:
Send an
Idempotency-Key header with a value you generate and keep, on every
route, including the first request:
GET /api/v1/operations/{id} until its
status is succeeded or failed. If a request times out, retry with the same
Idempotency-Key to get the original operation back. Without it, a retry can
start a second restore that overwrites writes made after the first one.
The CLI has no restore command.
After the restore
- Check that your application reconnects and its queries work.
- Logins and passwords stay the same; you do not need a new connection string.
- A database that has additional roles can only be restored from a backup taken after the opt-in. Older backups do not contain those roles.
Limits
- No point-in-time recovery: you can restore to a backup, not to an arbitrary moment.
- You cannot restore one database’s backup into a different database.
- Cloning a database that has additional roles returns
409 LEGACY_OVERLAY_REQUIRES_V4.