Updated on 2025-08-11 GMT+08:00

Querying Instance DR Status

Function

This API is used to query instance DR status after a DR relationship is established. Before calling this API:

URI

GET /v3.5/{project_id}/instances/{instance_id}/disaster-recovery/monitor?disaster_type={disaster_type}

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

Yes

String

Definition

Instance ID, which uniquely identifies an instance.

Constraints

N/A

Range

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

Default Value

N/A

disaster_type

Yes

String

Definition

DR type.

Constraints

N/A

Range
  • stream: streaming DR.

Default Value

N/A

Request Parameters

None

Response Parameters

Table 2 Response body parameters

Parameter

Type

Description

instance_id

String

Definition

Instance ID.

Range

N/A

status

String

Definition

Streaming DR status.

Range

  • normal: The instance is not involved in the DR task.
  • full_backup: Full data replication in the primary instance is in progress.
  • archive: Streaming log replication in the primary instance is in progress.
  • backup_fail: Full data replication in the primary instance fails.
  • archive_fail: Streaming log replication in the primary instance fails.
  • switchover: The planned primary/standby switchover is in progress.
  • restore: Full data restoration in the DR instance is in progress.
  • restore_fail: Full data restoration in the DR instance fails.
  • recovery: Streaming log replication in the DR instance is in progress.
  • recovery_fail: Streaming log replication in the DR instance fails.
  • promote: The DR instance is being promoted to primary.
  • promote_fail: The DR instance fails to promote to primary.

rpo

String

Definition

RPO.

Range

N/A

rto

String

Definition

RTO.

Range

N/A

rpo_threshold

String

Definition

RPO threshold.

Range

N/A

rto_threshold

String

Definition

RTO threshold.

Range

N/A

switchover_progress

String

Definition

Switchover progress (%), for example, 40%.

Range

N/A

failover_progress

String

Definition

Failover progress (%), for example, 40%.

Range

N/A

Example Request

https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.5/4a52a8a8f63d4c6d966dff0e20b69738/instances/4d653d1caf0e4a49b4753713fac679e3in14/disaster-recovery/monitor?disaster_type=stream

Example Response

{ 
    "rpo":"0", 
    "rto":"0", 
    "status":"archive", 
    "instance_id":"b3692282395340c5b5421ecf3d7bd6adin14",  
    "rto_threshold":"900", 
    "rpo_threshold":"10", 
    "failover_progress":"", 
    "switchover_progress":""
}

Status Codes

Error Codes

For details, see Error Codes.