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

Creating a Manual Backup

Description

This API is used to create a manual backup for a DB instance.

URI

  • URI format

    POST https://{Endpoint}/v3/{project_id}/backups

  • URI example

    https://dds.ap-southeast-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/backups

Request Parameters

  • Parameter description
    Table 1 Parameter description

    Name

    Type

    Mandatory

    Description

    X-Auth-Token

    string

    Yes

    Definition

    User token obtained from IAM. For details, see Authentication.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    project_id

    string

    Yes

    Definition

    Project ID of a tenant in a region. To obtain the project ID, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    backup

    Object

    Yes

    Definition

    The backup parameter objects For more information, see Table 2.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    Table 2 backup field data structure description

    Name

    Type

    Mandatory

    Description

    instance_id

    String

    Yes

    Definition

    Instance ID, which can be obtained by calling the API described in Querying Instances and Details. If you do not have an instance, call the API described in Creating a DB Instance to create one.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    name

    String

    Yes

    Definition

    The manual backup name.

    Constraints

    The value must be 4 to 64 characters in length and start with a letter (from A to Z or from a to z). It is case-sensitive and can contain only letters, digits (from 0 to 9), hyphens (-), and underscores (_).

    Range

    N/A

    Default Value

    N/A

    description

    String

    No

    Definition

    The manual backup description.

    Constraints

    The value can include a maximum of 256 characters and cannot contain the following special characters: >!<"&'=

    Range

    N/A

    Default Value

    N/A

Example Request

Creating a manual backup whose name is mybackup1 and description is The first Manual backup
{
        "backup":{
                "instance_id": "a89dab5e39394eccbdb77b19d57b0180in02",
                "name": "mybackup1",
                "description": "The first Manual backup"
        }
}

Response Parameters

  • Parameter description
    Table 3 Parameter description

    Name

    Type

    Mandatory

    Description

    job_id

    String

    Yes

    Definition

    The ID of the asynchronous manual backup task.

    Range

    N/A

    backup_id

    String

    Yes

    Definition

    Manual backup ID

    Range

    N/A

Example Response

{
    "job_id": "a03b1b8a-b756-467c-8a49-38720c3d23ec",    
    "backup_id": "bf9ee62a7f7044c583c6765c916c36edbr02"
}

SDK

Click Document Database Service DDS SDK to download the SDK or view the SDK document. To learn how to install and authenticate an SDK, read the Usage section.

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.