Restore Database
Overwrite the database's current data with one of its backups, in place.
backup_id is a backup from GET /databases/{id}/backups that has completed. The database keeps its name, host, user and password, so connected applications only need to reconnect. Works for PostgreSQL and MySQL databases that are not part of a replication group.
The restore runs in the background and the database shows the status restoring meanwhile; it is unavailable for most of that time. It first takes a safety backup of the current data (type pre_restore); if that backup fails, nothing is overwritten and the database returns to running with the reason in error_message. On success the database returns to running; if the restore fails after the data was touched, it goes to error.
Responds 202 with the database (status restoring), 400 when the backup cannot be restored in place, 404 when the database or backup is not found, and 409 when the database is not running or already restoring.
Request
- Base URL: https://api.mengi.cloud (the document declares no server; this is the origin it was published from)
- URL: https://api.mengi.cloud/databases/{database_id}/restore
- Auth: none declared
Path parameters
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.