Help Center/ GaussDB/ API Reference/ APIs (Recommended)/ Backup and Restoration/ Querying Information About the Original Instance Based on a Specific Point of Time or a Backup File
Updated on 2025-08-11 GMT+08:00

Querying Information About the Original Instance Based on a Specific Point of Time or a Backup File

Function

This API is used to query the information of the original instance based on a specific point of time or a backup file. Before calling this API:

Constraints

The restore_time and backup_id parameters cannot be both left blank.

  • If backup_id is not left blank, the query is performed based on backup_id.
  • If backup_id is left blank, the query is performed based on restore_time.
  • If restore_time and backup_id are both specified, the query is performed based on backup_id.

URI

GET /v3.1/{project_id}/instance-snapshot?instance_id={instance_id}&restore_time={restore_time}&backup_id={backup_id}

Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

instance_id

No

String

Definition

Original instance ID.

Constraints

If restore_time is specified, instance_id is mandatory.

Range

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

Default Value

N/A

restore_time

No

String

Definition

Restoration time point. This parameter is mandatory when you want to view DB instance backups based on a specified point in time.

The value is a UNIX timestamp, in milliseconds. The time zone is UTC.

Constraints

N/A

Range

N/A

Default Value

N/A

backup_id

No

String

Definition

Backup ID.

Constraints

This parameter is mandatory when a DB instance is restored using a backup ID.

Range

N/A

Default Value

N/A

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

cluster_mode

String

Definition

Instance deployment model.

Range

  • Ha: centralized deployment
  • Independent: independent deployment
  • Combined: combined deployment

instance_mode

String

Definition

Instance model.

Range

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

data_volume_size

String

Definition

Storage space, in GB

Range

N/A

solution

String

Definition

Solution template type.

Range

  • single: single node
  • double: 1 primary + 1 standby (2 nodes)
  • triset: 1 primary + 2 standby
  • logger: 1 primary + 1 standby + 1 log
  • loggerdorado: 1 primary + 1 standby + 1 log (shared storage)
  • quadruset: 1 primary + 3 standby
  • hws: distributed (independent deployment)

node_num

Integer

Definition

Number of nodes.

Range

N/A

coordinator_num

Integer

Definition

Number of CNs.

Range

N/A

sharding_num

Integer

Definition

Number of shards.

Range

N/A

replica_num

Integer

Definition

Number of replicas.

Range

N/A

engine_version

String

Definition

Engine version.

Range

N/A

Example Request

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instance-snapshot

Example Response

{ 
  "cluster_mode" : "Ha", 
  "instance_mode" : "enterprise", 
  "data_volume_size" : "200", 
  "solution" : "triset", 
  "node_num" : 3, 
  "coordinator_num" : 0, 
  "sharding_num" : 3, 
  "replica_num" : 3, 
  "engine_version" : "V2.0-2.2.90"

}

Status Codes

Error Codes

For details, see Error Codes.