Creating a Manual Backup

Function

This API is used to create a manual backup.

URI

  • URI format

    PATH: /rds/v1/{project_id}/backups

    Method: POST

  • Parameter description

    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

Request

  • Parameter description

    Table 2 Parameter description

    Name

    Mandatory

    Type

    Description

    backup

    Yes

    Dictionary data structure. For details, see Table 3.

    Specifies the manual backup object.

    Table 3 backup field data structure description

    Name

    Mandatory

    Type

    Description

    description

    No

    String

    Specifies the backup description. It contains a maximum of 256 characters and cannot contain the following special characters: !<>='&"

    instance

    Yes

    String

    Specifies the primary node ID of the DB instance.

    Note

    This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations.

    name

    Yes

    String

    Specifies the backup name. It must be 4 to 64 characters in length and start with a letter. It is case-sensitive and can contain only letters, digits, hyphens (-), and underscores (_).

  • Request example

    {
    "backup": {
    "description": "My Backup",
    "instance": "44b277eb-39be-4921-be31-3d61b43651d7",
    "name": "backup"
    }
    }
    

Normal Response

  • Parameter description

    Table 4 Parameter description

    Name

    Type

    Description

    backup

    Dictionary data structure. For details, see Table 5.

    Specifies the manual backup information.

    extendparam

    Dictionary data structure. For details, see Table 7.

    Indicates the extended parameter.

    Table 5 backup field data structure description

    Name

    Type

    Description

    created

    String

    Indicates the creation time.

    dataStore

    Dictionary data structure. For details, see Table 6.

    Indicates the database version.

    description

    String

    Indicates the backup description.

    id

    String

    Indicates the backup UUID.

    instance_id

    String

    Indicates the primary node ID of the DB instance.

    Note

    This field is not the DB instance ID. You are advised to use API v3 and the DB instance ID to perform related operations.

    locationRef

    String

    This is a reserved string and has no meanings.

    name

    String

    Indicates the backup file name.

    parent_id

    String

    This is a reserved string and has no meanings.

    size

    Double

    Indicates the file size in GB. Here its value is null.

    status

    String

    Indicates the backing up status with the value BUILDING.

    updated

    String

    Indicates the completion time with the returned value null.

    backuptype

    String

    The default value is 1, indicating a manual backup.

    Table 6 dataStore field data structure description

    Name

    Type

    Description

    type

    String

    Indicates the DB engine. Valid value:

    • MySQL

    • PostgreSQL

    • SQLServer

    version

    String

    Indicates the database version.

    For example, 5.6.30.

    version_id

    String

    Indicates the database version ID. Its value is unique.

    Table 7 extendparam field data structure description

    Name

    Type

    Description

    jobs

    String

    Indicates the task ID.

  • Response example

    {
        "backup": {
            "created": "2016-09-12T01:17:05",
            "dataStore": {
                "type": "MySQL",
                "version": "5.6.30",
                "version_id": "e8a8b8cc-63f8-4fb5-8d4a-24c502317a61"
            },
            "description": "123",
            "id": "2f4ddb93-b901-4b08-93d8-1d2e472f30fe",
            "instance_id": "0bc7300c-dc63-45d4-aa3b-d85bf577baac",
            "locationRef": null,
            "name": "test01",
            "parent_id": null,
            "size": null,
            "status": "BUILDING",
            "updated": null,
            "backuptype": "1"
        },
        "extendparam": {
        "jobs": [
                    "ff80808157127d9301571bf8160c001d"
                ]
          }
    }
    

Abnormal Response

For details, see Abnormal Request Results.