Disaster Recovery Endpoints
This section describes the usage and specifics of the available disaster recovery endpoints of the a9s Public API V1.
Prepare a Disaster Recovery
This request prepares the required information for a Service Instance's disaster recovery.
Route
POST /v1/instances/:instance_id/disaster-recovery/prepare
Body
The body must be sent in valid JSON format.
| Request Field | Type | Required | Description |
|---|---|---|---|
encryption_key | string | false | Optional The key which the Backup Manager is using to encrypt backups |
It is worth noting that while the a9s Backup Manager can change the encryption key, it does not return it, thus it is necessary to save it manually, in a secure place.
Keep in mind that setting a new encryption key will overwrite and replace any previously existing encryption key. This new encryption key is not retroactively applied, so any prior backups cannot be decrypted with it. Therefore, it is recommended that old encryption keys are kept in a secure place.
cURL
curl -X POST --header "Content-Type: application/json" --header "Authorization: $(bearer_token)" \
--data '{"encryption_key":"<encryption_key>"}' "${url}/disaster-recovery/prepare"
Response
Body
For success responses, the following fields are defined:
| Response Field | Type | Description |
|---|---|---|
backup_guid | string | The GUID which the a9s Backup Manager is using to refer to backups of a given instance |
Example
{
"backup_guid": "3a2e59ee-40cb-472a-91d0-502ab259918c"
}
For error responses, the following fields are defined:
| Response Field | Type | Description |
|---|---|---|
error | string | A single word in camel case that uniquely identifies the error condition. |
description | string | A user-facing error message explaining why the request failed. |
Status
| Status Code | Description |
|---|---|
200 OK | If the request has been processed successfully. |
202 Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. |
401 Unauthorized | The user does not have valid authentication credentials for the target resource. |
403 Forbidden | The user does not have the required right to do this request. |
404 Not Found | Entity not found. |
409 Conflict | There is already such action in progress. |
500 Internal Server Error | An unexpected error occurred while handling the request. |
502 Bad Gateway | An error occurred during upstream communication. |
504 Gateway Timeout | A timeout occurred during upstream communication. |
Perform a Disaster Recovery
This request performs a Service Instance's disaster recovery in the destination Service Instance.
Route
POST /v1/instances/:instance_id/disaster-recovery/perform
Body
The body must be sent in valid JSON format.
| Request Field | Type | Required | Description |
|---|---|---|---|
backup_guid | string | true | The GUID which the a9s Backup Manager uses to refer to the originating Service Service Instance's backups |
encryption_key | string | true | The key which the Backup Manager is using to encrypt backups |
cURL
curl -X POST --header "Content-Type: application/json" --header "Authorization: $(bearer_token)" \
--data '{"encryption_key":"<encryption_key>", "backup_guid":"<backup_guid>"}' \
"${url}/disaster-recovery/perform"
Response
Body
For success responses, the following fields are defined:
| Response Field | Type | Description |
|---|---|---|
restore_id | integer | The internal ID of the restore in the destination Service Instance. |
Example
{
"restore_id": 1
}
For error responses, the following fields are defined:
| Response Field | Type | Description |
|---|---|---|
error | string | A single word in camel case that uniquely identifies the error condition. |
description | string | A user-facing error message explaining why the request failed. |
Status
| Status Code | Description |
|---|---|
200 OK | If the request has been processed successfully. |
202 Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this. |
401 Unauthorized | The user does not have valid authentication credentials for the target resource. |
403 Forbidden | The user does not have the required right to do this request. |
404 Not Found | Entity not found. |
409 Conflict | There is already such action in progress. |
500 Internal Server Error | An unexpected error occurred while handling the request. |
502 Bad Gateway | An error occurred during upstream communication. |
504 Gateway Timeout | A timeout occurred during upstream communication. |