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

Backing Up a DCS Instance

Function

This API is used to back up a specific DCS instance.

Only master/standby and cluster DCS instances can be backed up and restored, while single-node instances cannot.

URI

POST /v2/{project_id}/instances/{instance_id}/backups

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition:

Project ID. For details, see Obtaining a Project ID.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

instance_id

Yes

String

Definition:

Instance ID. It can be viewed on the instance details page on the DCS console.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

Request Parameters

Table 2 Request body parameters

Parameter

Mandatory

Type

Description

remark

No

String

Definition:

Description of DCS instance backup.

Constraints:

N/A

Range:

N/A

Default Value:

N/A

backup_format

No

String

Definition:

Format of the DCS instance backup.

Constraints:

N/A

Range:

  • aof

  • rdb

Default Value:

rdb

Response Parameters

Status code: 200

Table 3 Response body parameters

Parameter

Type

Description

backup_id

String

Definition:

Backup record ID.

Range:

N/A

Status code: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Status code: 500

Table 5 Response body parameters

Parameter

Type

Description

error_msg

String

Definition:

Error message.

Range:

N/A

error_code

String

Definition:

Error code.

Range:

For details, see Error Codes.

error_ext_msg

String

Definition:

Extended error information. This parameter is not used currently and is set to null.

Range:

N/A

Example Requests

Backing up a specified DCS instance to an AOF file

POST https://{dcs_endpoint}/v2/{project_id}/instances/{instance_id}/backups

{
  "remark" : "Backup instances",
  "backup_format" : "aof"
}

Example Responses

Status code: 200

The specified DCS instance is backed up successfully.

{
  "backup_id" : "548ceeff-2cbb-47ab-9a1c-7b085a8c08d7"
}

Status Codes

Status Code

Description

200

The specified DCS instance is backed up successfully.

400

Invalid request.

500

Internal service error.

Error Codes

See Error Codes.