Help Center> GeminiDB> API Reference> APIs v3 (Recommended)> Disaster Recovery> Pausing/Resuming Data Synchronization Between Two Instances with a DR Relationship
Updated on 2023-11-21 GMT+08:00

Pausing/Resuming Data Synchronization Between Two Instances with a DR Relationship

Function

This API is used to pause or resume data synchronization between two instances with a DR relationship.

Data synchronization is paused or resumed only after this API is successfully called for both of the instances, respectively.

Constraints

  • This API supports GeminiDB Redis instances.
  • This API can be called on the condition that two instances with a DR relationship should be a primary and standby instance, respectively and should be both in the normal status.
  • This API can be called to only when data synchronization stops for both instances between which there is a DR relationship.

URI

POST https://{Endpoint}/v3/{project_id}/instances/{instance_id}/disaster-recovery/data-synchronization

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

instance_id

Yes

String

Instance ID.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

action

Yes

String

Action on data synchronization between two instances with a DR relationship. The value can be:

  • pause, indicating that data synchronization is paused between the two instances.
  • resume, indicating that data synchronization is resumed between the two instances.

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

job_id

String

ID of the task of pausing or resuming data synchronization between two instances with a DR relationship.

Example Requests

  • URI example
    POST https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/d58c24da5c2d445f87dc8d697ab3ccb7in12/disaster-recovery/data-synchronization
  • Example request body

    Pausing data synchronization between two instances with a DR relationship

    {"action":"pause"}

    Resuming data synchronization between two instances with a DR relationship

    {"action":"resume"}

Example Responses

Status code: 202

Accepted

{ 
  "job_id" : "c010abd0-48cf-4fa8-8cbc-090f093eaa2f"
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.