Skip to main content
POST
Restore a database snapshot
This route has a rate limit of 1 request every 60 seconds. The account that owns the database also has a daily restore cap: as many restores per 24 hours as its plan’s daily snapshot allowance, shared between applications and databases and counted separately from the snapshots it takes.
string
required
The API key for your account. You can find this in your account settings.
Requires an API key with the snapshots:write scope. Restores a database in-place from a previously taken snapshot, identified by the snapshotId and versionId returned from Create Snapshot or List Snapshots. The snapshot’s engine must match the target database’s type, you cannot restore a Redis snapshot onto a MongoDB database, for example. This overwrites the database’s current data with the snapshot’s contents; there is no undo beyond taking another snapshot first. While the restore is running, Start, Stop and Delete Database are rejected for that database. Rate limited to 1 restore per 60 seconds per user, and 1 restore per 120 seconds per database.

Parameters

string
required
The ID of the database.
string
required
The snapshot name from the listing (the database ID suffixed with _<type> and, on newer snapshots, _<origin>), passed exactly as returned.
string
required
The snapshot’s version_id, as List Snapshots returns it.

Response

string
Indicates whether the call was successful: success if it was, error if not.

Long restores

The route answers 200 when the restore finishes within about 90 seconds. A larger one answers 202 with the code SNAPSHOT_RESTORE_PROCESSING. It keeps the error envelope for compatibility, but it is not a failure: the restore is still running in the background. Don’t send the restore again. Follow it with Get Restore State, which reports the step it is on and, at the end, success or error with the failure code.

Common errors