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-05-21 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 are mutually exclusive. When the API is called, only one of them can be configured. It means that the two parameters cannot be configured or left empty at the same time.

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

Project ID of a tenant in a region.

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

instance_id

No

String

Original instance ID.

restore_time

No

String

This parameter is mandatory when you wan 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.