You can restore a database cluster in-place from a previous snapshot.
To restore from a snapshot you will need to provide a snapshot ID. You can request a list of all available snapshots:
You can now create a restore job for the chosen cluster. Your database will not be available during the restore operation. In order to successfully create a restore job, no other active restore job must exist.
Restore snapshot request
Response
The API will respond with a 202 Accepted status code if the request is successful.
Use the recovery target point in time which specifies the exact oplog timestamp that you choose to restore the database cluster.
Point in time recovery request
Response
The API will respond with a 202 Accepted status code if the request is successful.
curl --include \
--user "[email protected]:Mb2.r5oHf-0t" \
--header "Content-Type: application/json" \
https://api.ionos.com/databases/mongodb/clusters/cc54e0f2-5e49-42bf-97e8-089c2eff0264/snapshots{
"type": "collection",
"id": "cc54e0f2-5e49-42bf-97e8-089c2eff0264",
"items": [
{
"type": "snapshot",
"id": "e2044962-294a-4c99-b076-414b2a387c58",
"properties": {
"mongoDBVersion": "5.0",
"size": 150,
"creationTime": "2020-12-10T13:37:50+01:00"
}
}
],
"offset": 0,
"limit": 10,
"_links": {}
}curl --include \
--request POST \
--user "[email protected]:Mb2.r5oHf-0t" \
--header "Content-Type: application/json" \
--data-binary '{
"snapshotId": "e2044962-294a-4c99-b076-414b2a387c58",
}' \
https://api.ionos.com/databases/mongodb/clusters/cc54e0f2-5e49-42bf-97e8-089c2eff0264/restorecurl --include \
--request POST \
--user "[email protected]:Mb2.r5oHf-0t" \
--header "Content-Type: application/json" \
--data-binary '{
"recoveryTargetTime": "2023-04-21T13:37:50+01:00",
}' \
https://api.ionos.com/databases/mongodb/clusters/cc54e0f2-5e49-42bf-97e8-089c2eff0264/restore