Updated on 2023-11-21 GMT+08:00

Restoring Data to an Existing Instance

Function

This API is used to restore data to an existing instance.

Constraints

This API supports GeminiDB Mongo instances.

The destination instance cannot be an instance that is undergoing a restoration task.

The destination instance must be of a version no earlier than and the specifications no lower than the source and have storage space no smaller than the size of the used backup file.

URI

POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/recovery

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a user in a region. To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If there are no instances available, call the API described in Creating an Instance to create one.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

backup_id

Yes

String

Backup file name. You can restore a backup file to an existing instance.

password

No

String

Instance password.

The password can include 8 to 32 characters and contain uppercase letters, lowercase letters, digits, and the following special characters: ~!@#%^*-_=+? The password of GeminiDB Redis instances can contain at least two types of the following characters: uppercase letters, lowercase letters, digits, and special characters (~!@#$%^&*()-_=+?).

  • If this parameter is not specified, the password stored in the backup file will overwrite the password of the existing instance after restoration is complete.
  • If this parameter is specified, the configured password will overwrite the password of the existing instance after restoration is complete.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Task ID.

Example Requests

  • URI example
    POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/054e292c9880d4992f02c0196d3ea468/instances/61f554065802400c9c33f87e8114f081in10/recovery
  • Restoring data to an existing instance
    {
      "backup_id" : "a8114c9b30cf42b6ba7752bfa62dee0bbr10",
      "password" : "******"
    }

Example Responses

Status code: 202

Accepted

{
  "job_id" : "f85104b5-4a9c-4e0f-9505-fc5409d8f7ae"
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.