Updated on 2024-03-28 GMT+08:00

Creating a Manual Backup

Function

This API is used to create a manual backup.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • Read replicas do not support manual backup creation.
  • The backup name must be unique.

URI

  • URI format

    POST /v3/{project_id}/backups

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

Request

Parameter description
Table 2 Parameter description

Name

Mandatory

Type

Description

instance_id

Yes

String

Specifies the DB instance ID.

name

Yes

String

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

The backup name must be unique.

description

No

String

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

Example Request

  • Creating a manual backup mybackup for an RDS for MySQL DB instance
    {
    	"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01",
    	"name": "mybackup",
    	"description": "manual backup"
    }
  • Creating a manual backup mybackup for an RDS for PostgreSQL DB instance
    {
    	"instance_id": "a8a5fc65b1a04ceb9d72212891ad73f8in03",
    	"name": "mybackup",
    	"description": "manual backup"
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    backup

    Object

    Indicates the backup information.

    For details, see Table 4.

    Table 4 backup field data structure description

    Name

    Type

    Description

    id

    String

    Indicates the backup ID.

    instance_id

    String

    Indicates the DB instance ID.

    name

    String

    Indicates the backup name.

    description

    String

    Indicates the backup description.

    begin_time

    String

    Indicates the backup start time in the "yyyy-mm-ddThh:mm:ssZ" format, where "T" indicates the start time of the time field, and "Z" indicates the time zone offset.

    status

    String

    Indicates the backup status. Value:

    • BUILDING: Backup in progress
    • COMPLETED: Backup completed
    • FAILED: Backup failed
    • DELETING: Backup being deleted

    type

    String

    Indicates the backup type. Value:

    • auto: automated full backup
    • manual: manual full backup
    • fragment: differential full backup
    • incremental: automated incremental backup
  • Example normal response
    Creating a manual backup for an RDS for MySQL DB instance:
    {
    	"backup": {
    		"id": "cb211c0075104151a748a854bc8bd87dbr01",
    		"name": "mybackup",
    		"description": "manual backup",
    		"begin_time": "2022-08-23T07:41:50Z",
    		"status": "BUILDING",
    		"type": "manual",
    		"instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01"
    	}
    }
    Creating a manual backup for an RDS for PostgreSQL DB instance:
    {
    	"backup": {
    		"id": "104b59afd83d4fc7b2c03ad14c4be080br03",
    		"name": "mybackup",
    		"description": "manual backup",
    		"begin_time": "2022-08-23T07:20:36Z",
    		"status": "BUILDING",
    		"type": "manual",
    		"instance_id": "a8a5fc65b1a04ceb9d72212891ad73f8in03"
    	}
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.