Help Center/ GeminiDB/ API Reference/ API v3/ Backups and Restorations/ Restoring Data to an Existing Instance
Updated on 2026-09-22 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.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    gaussdbfornosql:instance:restore

    Write

    -

    -

    nosql:backup:refreshInstanceFromBackup

    -

URI

POST /v3/{project_id}/instances/{instance_id}/recovery

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

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

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID. To obtain the value, call the Querying Instances and Details API. If no instance is available, call the Creating an Instance API to create one.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token

You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

backup_id

Yes

String

Definition

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

For details about how to obtain the value, see backups in "Response Parameters" in Querying Backups.

Constraints

N/A

Range

N/A

Default Value

N/A

password

No

String

Definition

Instance password.

Constraints

  • 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.

Range

The value can contain 8 to 32 characters, including uppercase letters, lowercase letters, digits, and special characters ~!@#%^-_=+?

Default Value

N/A

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

Example Requests

Restoring Data to an Existing Instance
POST https://{Endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/61f554065802400c9c33f87e8114f081in10/recovery

{
  "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.