Creates a backup file for an instance.
Operation description
Supported database engines
- MySQL
- PostgreSQL
- SQL Server
- MariaDB
Usage notes
This operation uses the backup feature of ApsaraDB RDS to create a backup set. You can also use an operation of Database Backup (DBS) to create a backup set. For more information, see List of operations by function of DBS.
Precautions
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.
References
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. You can call the DescribeDBInstances operation to query the instance ID. | rm-uf6wjk5**** |
DBName | string | No | 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.
| rds_mysql |
BackupStrategy | string | No | The backup policy. 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.
| db |
BackupMethod | string | No | The backup type of the instance. Valid values:
Default value: Physical. Note
| Physical |
BackupType | string | No | The backup method. Valid values:
Default value: Auto. Note
| Auto |
ResourceGroupId | string | No | The resource group ID. You can call the DescribeDBInstanceAttribute to query the resource group ID. | rg-acfmy***** |
Response parameters
Examples
Sample success responses
JSON
format
{
"BackupJobId": "5073731",
"RequestId": "2C125605-266F-41CA-8AC5-3A643D4F42C5"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | BackupType.NotSupport | the specified backup type not support | This operation is not supported for the specified backup type. |
400 | InvalidBackupMethod.ValueNotSupport | The specified parameter "BackupMethod" is not valid. | The backup method is invalid. Specify a valid backup method. Valid values: Logical and Physical. Default value: Physical. Logical backups are not supported for RDS instances in which no databases are created, and physical backups are supported only for RDS instances that run SQL Server. |
400 | ReadDBInstanceNotSupport | The operation is not permitted due to type of the instance. | - |
400 | IncorrectDBInstanceLockMode.ValueNotSupported | The Current DB instance lock mode does not support this operation. | The operation failed. The RDS instance is locked. |
400 | BackupJobExists | A backup job already exists in the specified DB instance. | The backup has been created. |
400 | InvalidPreferredBackupTime.Format | Specified preferred backup time is not valid. | The time of the backup file is invalid. Specify the time in the GMT standard in the YYYY-MM-DDThh:mmZ format. Example: 2012-06-11T15:00Z. |
400 | InvalidDBName.Format | Specified DB name is not valid. | The database name is invalid. Specify a valid name. The name can be up to 16 characters in length and can contain lowercase letters, digits, and underscores (_). The name must start with a lowercase letter and end with a lowercase letter or a digit. |
403 | OperationDenied.ApiForbidden | operation not permitted. | The operation is not allowed. |
403 | IncorrectDBInstanceEngine | Current DB Instance engine does not support this operation. | The operation failed. The operation is not supported for the database engine that is run on the RDS instance. |
403 | IncorrectDBInstanceType | Current DB instance engine and type does not support operations. | The operation failed. The operation is not supported for the database engine of the RDS instance. |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | - |
403 | IncorrectDBInstanceCharacterType | Current DB Instance character_type does not support this operation. | This operation is not supported for the character type of the current instance. |
403 | Exceeded.BackupTimes | The backup times exceeds. | The specified BackupTimes parameter is invalid. |
404 | InvalidDBInstanceName.NotFound | The database instance does not exist. | The name of the RDS instance cannot be found. Check the name of the RDS instance. |
404 | InvalidDB.NotFound | Specified db does not exist or DB status does not support this operation. | The operation failed. The database cannot be found or is not in a ready state. You can call the DescribeDatabases operation to view the databases of an RDS instance. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2022-10-28 | The Error code has changed | View Change Details |