# Restore

Everything about restoring MariaDB clusters from a backup.

## In-place restore of a cluster.

> Restore a MariaDB cluster from a backup.\
> \
> Conditions:\
> &#x20;\- The backup must belong to the MariaDB cluster to\
> &#x20;  be restored.\
> &#x20;\- The cluster must be in the state "AVAILABLE".

```json
{"openapi":"3.0.3","info":{"title":"IONOS DBaaS MariaDB REST API","version":"0.1.0"},"tags":[{"name":"Restore","description":"Everything about restoring MariaDB clusters from a backup."}],"servers":[{"url":"https://mariadb.de-fra.ionos.com","description":"Frankfurt, Germany"},{"url":"https://mariadb.de-txl.ionos.com","description":"Berlin, Germany"},{"url":"https://mariadb.es-vit.ionos.com","description":"Logroño, Spain"},{"url":"https://mariadb.fr-par.ionos.com","description":"Paris, France"},{"url":"https://mariadb.gb-lhr.ionos.com","description":"London, Great Britain"},{"url":"https://mariadb.us-ewr.ionos.com","description":"Newark, USA"},{"url":"https://mariadb.us-las.ionos.com","description":"Las Vegas, USA"},{"url":"https://mariadb.us-mci.ionos.com","description":"Lenexa, USA"}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Please provide header value as 'Bearer <token>' and don't forget to add\n'Bearer' HTTP Authorization Scheme before the token.\n"}},"parameters":{"ClusterIDPath":{"name":"clusterId","in":"path","description":"The unique ID of the cluster.","required":true,"schema":{"type":"string"}}},"schemas":{"RestoreRequest":{"type":"object","required":["backupId"],"description":"Request payload to restore a cluster from a backup.\n","properties":{"backupId":{"$ref":"#/components/schemas/ResourceID"},"recoveryTargetTime":{"type":"string","format":"date-time","description":"The timestamp to which the cluster should be restored.\nIf empty, the backup will be applied to the latest\ntimestamp.\n\nThis value must be supplied as ISO 8601 timestamp, the\nbackup will be replayed up until the given timestamp.\nIf empty, the backup will be applied completely.\n\nMust be within the earliestRecoveryTargetTime and now.\n\nThe earliestRecoveryTargetTime can be looked up in the\nbackup object.\n"}}},"ResourceID":{"type":"string","description":"The unique ID of the resource."},"ErrorMessage":{"properties":{"errorCode":{"type":"string","description":"Application internal error code\n"},"message":{"type":"string","description":"A human readable explanation specific to this occurrence of the\nproblem.\n"}},"type":"object"}},"responses":{"Error400":{"description":"Parse error.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error401":{"description":"Authentication error.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error403":{"description":"Unauthorized.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error404":{"description":"Not Found.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error405":{"description":"Unsupported HTTP method.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error415":{"description":"Unsupported content type.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error422":{"description":"Validation error.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error429":{"description":"Request rate limit exceeded.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error500":{"description":"Server error.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}},"Error503":{"description":"Maintenance.","content":{"application/json":{"schema":{"properties":{"httpStatus":{"type":"integer","description":"The HTTP status code of the operation."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/ErrorMessage"}}},"required":["httpStatus","messages"],"type":"object"}}}}}},"paths":{"/clusters/{clusterId}/restore":{"post":{"operationId":"clustersRestore","summary":"In-place restore of a cluster.","description":"Restore a MariaDB cluster from a backup.\n\nConditions:\n - The backup must belong to the MariaDB cluster to\n   be restored.\n - The cluster must be in the state \"AVAILABLE\".","parameters":[{"$ref":"#/components/parameters/ClusterIDPath"}],"tags":["Restore"],"requestBody":{"description":"The backup to restore from.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RestoreRequest"}}},"required":true},"responses":{"202":{"description":"Successful operation."},"400":{"$ref":"#/components/responses/Error400"},"401":{"$ref":"#/components/responses/Error401"},"403":{"$ref":"#/components/responses/Error403"},"404":{"$ref":"#/components/responses/Error404"},"405":{"$ref":"#/components/responses/Error405"},"415":{"$ref":"#/components/responses/Error415"},"422":{"$ref":"#/components/responses/Error422"},"429":{"$ref":"#/components/responses/Error429"},"500":{"$ref":"#/components/responses/Error500"},"503":{"$ref":"#/components/responses/Error503"}}}}}}
```
