Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Backup and Restoration/ Querying Instances That Can Be Used for Backups and Restorations
Updated on 2025-08-19 GMT+08:00

Querying Instances That Can Be Used for Backups and Restorations

Function

This API is used to query the instances that can be used for backups and restorations. Before calling this API:

Constraints

The restore_time and backup_id parameters cannot be both left blank.

URI

GET /v3.1/{project_id}/restorable-instances

Table 1 Parameter description

Parameter

Mandatory

Description

project_id

Yes

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

backup_id

No

Definition

Instance backup ID. You can use the backup ID to query the instance topology information and filter the queried instances (including the number of nodes and replicas of instances). If this parameter is left blank, restore_time is used.

Constraints

N/A

Range

N/A

Default Value

N/A

restore_time

No

Definition

Specific point of time. If the backup ID is left blank, this parameter is used to query the instance topology information and filter the queried instances.

Constraints

N/A

Range

N/A

Default Value

N/A

source_instance_id

No

Definition

ID of the DB instance to be restored.

Constraints

  • If backup_id is not left blank, source_instance_id is optional.
  • If backup_id is left blank and restore_time is not left blank, source_instance_id is mandatory.
  • source_instance_id and backup_id cannot be both left blank.

Range

N/A

Default Value

N/A

offset

No

Definition

Index offset. The query starts from the next piece of data indexed by this parameter.

Constraints

The value must be a non-negative integer.

Range

N/A

Default Value

0: The query starts from the first data record.

limit

No

Definition

Number of records returned by a query.

Constraints

N/A

Range

[1,100]

Default Value

100

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

instances

Array of objects

Definition

Instances that can be used for backups and restorations.

For details, see Table 3.

total_count

Integer

Definition

Total number of queried instances.

Range

N/A

Table 3 instances parameter data structure description

Parameter

Type

Description

instance_name

String

Definition

DB instance name.

Range

N/A

instance_id

String

Definition

Instance ID.

Range

N/A

volume_type

String

Definition

Storage type.

Range

N/A

data_volume_size

Number

Definition

Storage space, in GB

Range

N/A

version

String

Definition

Instance version.

Range

N/A

mode

String

Definition

Deployment model.

Range

  • Ha: centralized deployment
  • Independent: independent deployment

instance_mode

String

Definition

Instance model.

Range

  • enterprise: enterprise edition
  • standard: standard edition
  • basic: basic edition

Example Request

Querying instances that can be used for backups and restorations

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0611f1bd8b00d5d32f17c017f15b599f/restorable-instances?source_instance_id=88efb3753dc844829c380edff7798eecin14&backup_id=d3f223e9c35d450ea0692bdbff686e45br14

Example Response

Instances that can be used for backups and restorations queried.

{
    "instances": [
        {
            "instance_name": "gaussdb",
            "instance_id": "3ea6d6463c9a4baf9a47c5b74464307cin14",
            "volume_type": "ULTRAHIGH",
            "data_volume_size": 500,
            "version": "V2.0-8.102",
            "mode": "Ha",
            "instance_mode": "enterprise"
        }
    ],
    "total_count": 1
}

Status Codes

Error Codes

For details, see Error Codes.