You can call the CreateBackup operation to create a backup file for an instance.
This operation uses the backup feature of ApsaraDB RDS to create a backup file. You can also use an operation of Database Backup (DBS) to create a backup file.
Before you call this operation, make sure that the following requirements are met:
- The instance is in the Running state.
- The instance does not have ongoing backup tasks.
- The number of backup files that are created per day for an instance cannot exceed 20.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateBackup | The operation that you want to perform. Set the value to CreateBackup. |
DBInstanceId | String | Yes | rm-uf6wjk5**** | The ID of the instance. |
DBName | String | No | rds_mysql | The names of the databases whose data you want to back up. Separate the names of the databases with commas (,). Note You can specify this parameter when you perform a logical backup on individual databases of an ApsaraDB RDS for MySQL instance. You can also specify this parameter when you perform a full physical backup on individual databases of an ApsaraDB RDS for SQL Server instance. |
BackupStrategy | String | No | db | The policy that you want to use for the backup file. Valid values:
Note You can specify this parameter when you perform a logical backup on an ApsaraDB RDS for MySQL instance. You can also specify this parameter when you perform a full physical backup on an ApsaraDB RDS for SQL Server instance. |
BackupMethod | String | No | Physical | The type of backup that you want to perform. Valid values:
Default value: Physical. Note
|
BackupType | String | No | Auto | The backup method. Valid values:
Default value: Auto. Note
|
ResourceGroupId | String | No | rg-acfmy***** | The ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
BackupJobId | String | 5073731 | The ID of the backup task. |
RequestId | String | 2C125605-266F-41CA-8AC5-3A643D4F42C5 | The ID of the request. |
Examples
Sample requests
http(s)://rds.aliyuncs.com/?Action=CreateBackup
&DBInstanceId=rm-uf6wjk5****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<CreateBackupResponse>
<RequestId>2C125605-266F-41CA-8AC5-3A643D4F42C5</RequestId>
<BackupJobId>5073731</BackupJobId>
</CreateBackupResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "2C125605-266F-41CA-8AC5-3A643D4F42C5",
"BackupJobId" : "5073731"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
403 | OperationDenied.ApiForbidden | operation not permitted. | The error message returned because the current operation is not supported. |
For a list of error codes, visit the API Error Center.