Skip to main content
Version: Latest

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 FieldTypeRequiredDescription
encryption_keystringfalseOptional The key which the Backup Manager is using to encrypt backups
note

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 FieldTypeDescription
backup_guidstringThe 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 FieldTypeDescription
errorstringA single word in camel case that uniquely identifies the error condition.
descriptionstringA user-facing error message explaining why the request failed.

Status

Status CodeDescription
200 OKIf the request has been processed successfully.
202 AcceptedThe 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 UnauthorizedThe user does not have valid authentication credentials for the target resource.
403 ForbiddenThe user does not have the required right to do this request.
404 Not FoundEntity not found.
409 ConflictThere is already such action in progress.
500 Internal Server ErrorAn unexpected error occurred while handling the request.
502 Bad GatewayAn error occurred during upstream communication.
504 Gateway TimeoutA 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 FieldTypeRequiredDescription
backup_guidstringtrueThe GUID which the a9s Backup Manager uses to refer to the originating Service Service Instance's backups
encryption_keystringtrueThe 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 FieldTypeDescription
restore_idintegerThe internal ID of the restore in the destination Service Instance.
Example
{
"restore_id": 1
}

For error responses, the following fields are defined:

Response FieldTypeDescription
errorstringA single word in camel case that uniquely identifies the error condition.
descriptionstringA user-facing error message explaining why the request failed.

Status

Status CodeDescription
200 OKIf the request has been processed successfully.
202 AcceptedThe 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 UnauthorizedThe user does not have valid authentication credentials for the target resource.
403 ForbiddenThe user does not have the required right to do this request.
404 Not FoundEntity not found.
409 ConflictThere is already such action in progress.
500 Internal Server ErrorAn unexpected error occurred while handling the request.
502 Bad GatewayAn error occurred during upstream communication.
504 Gateway TimeoutA timeout occurred during upstream communication.