Creating a Manual Backup
Function
This API is used to create a manual backup.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Constraints
- RDS for SQL Server supports batch creation of manual backups for individual databases.
- Read replicas do not support manual backup creation.
- The backup name must be unique.
URI
- URI format
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID. |
name |
Yes |
String |
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 |
Backup description. It contains a maximum of 256 characters and cannot contain the following special characters: >!<"&'= |
databases |
No |
Array of objects |
List of user-created databases for partial backup. This parameter is only available for RDS for PostgreSQL and RDS for SQL Server. For details, see Table 3. |
backup_database_individually |
No |
Boolean |
Whether to back up databases individually. This parameter is available only for RDS for PostgreSQL and RDS for SQL Server. The default value is false. |
Example Request
- Create a manual backup mybackup for an RDS for MySQL DB instance.
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/backups { "instance_id": "d8e6ca5a624745bcb546a227aa3ae1cfin01", "name": "mybackup", "description": "manual backup" }
- Create a manual backup mybackup for an RDS for PostgreSQL DB instance.
{ "instance_id": "a8a5fc65b1a04ceb9d72212891ad73f8in03", "name": "mybackup", "description": "manual backup" }
- Create a manual backup mybackup for an RDS for SQL Server DB instance.
{ "instance_id": "34029da944074135a3bc24c75b3bb3edin04", "name": "mybackup", "description": "manual backup", "databases": [{ "name": "db1" }, { "name": "db2" }] }
Response
- Normal response
Table 4 Parameters Parameter
Type
Description
backup
Object
Indicates the backup information.
For details, see Table 5.
Table 5 backup field data structure description Parameter
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.
databases
Array of objects
Indicates a list of user-created databases for partial backup. This parameter is only available for RDS for PostgreSQL and RDS for SQL Server.
For details, see Table 3.
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" } }
Creating a manual backup for an RDS for SQL Server DB instance:{ "backup": { "id": "6f7b5904b04043b38ad764e33daba810br04", "name": "mybackup", "description": "manual backup", "begin_time": "2022-08-23T07:15:28Z", "status": "BUILDING", "type": "manual", "instance_id": "34029da944074135a3bc24c75b3bb3edin04", "databases": [{ "name": "db1" }, { "name": "db2" }] } }
- Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot