You can call this operation to create a backup set for an instance.

This operation must meet the following requirements.

  • The instance is in the running state.
  • The instance does not have an ongoing backup task.
  • The number of backup sets that have been created for the instance on the day does not exceed 20.

Debugging

You can use OpenAPI Explorer to perform debugging.

OpenAPI Explorer provides various functions to simplify API usage. For example, you can retrieve APIs, call APIs, and generate SDK sample code.

Request parameters

Parameter Type Required? Example Description
Action String Yes CreateBackup

The operation that you want to perform. Set this parameter to CreateBackup.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

BackupMethod String No Physical

The backup type. Valid values:

  • Logical
  • Physical
  • Snapshot

Default value: Physical.

Note
  • Set Physical option when backing up a MariaDB snapshot.
  • Logical backups can be performed only when the instance exists in a database.
BackupStrategy String No db

The backup policy. Valid values:

  • db: single-database backups.
  • instance: instance backups.
Note This parameter can be entered when MySQL logical backups or full physical backups for SQL Server are performed.
DBName String No rds_mysql

The list of databases. Separate multiple databases with commas (,).

Note This parameter can be entered when single-database logical backups for MySQL or single-database full physical backups for SQL Server are performed.
BackupType String No Auto

The backup method. Valid values:

  • Auto: indicates that full or incremental backups are selected automatically.
  • FullBackup

Default value: Auto.

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-uf6wjk5xxxxxxx
&<Common request parameters>

Successful response examples

XML format

<CreateBackupResponse>
	  <RequestId>2C125605-266F-41CA-8AC5-3A643D4F42C5</RequestId>
	  <BackupJobId>5073731</BackupJobId></CreateBackupResponse>

JSON format

{
	"RequestId":"2C125605-266F-41CA-8AC5-3A643D4F42C5",
	"BackupJobId":"5073731"
}

Error codes

For a list of error codes, visit the API Error Center.