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 2024-12-13 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 https://{Endpoint}/v3/{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

Explanation:

Project ID of a tenant in a region.

For details about how to obtain the value, see Obtaining a Project ID.

Restrictions:

None

Value range:

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

Default value:

None

instance_id

No

String

Original instance ID.

If restore_time is specified, instance_id is mandatory.

restore_time

No

String

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

Instance information at a time point in the UNIX timestamp format, in milliseconds. The time zone is UTC.

backup_id

No

String

Backup ID.

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

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

cluster_mode

String

Instance deployment model.

Value:

  • Ha: primary/standby deployment
  • Independent: independent deployment
  • Combined: combined deployment

instance_mode

String

Instance model.

Value:

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

data_volume_size

String

Storage space, in GB

solution

String

Solution template type.

Value:

  • 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

Number of nodes.

coordinator_num

Integer

Number of CNs.

sharding_num

Integer

Number of shards.

replica_num

Integer

Number of replicas.

engine_version

String

Engine version.

Example Request

GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/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" : "2.2.90"

}

Status Code

Error Code

For details, see Error Codes.