Creates, configures, and starts a backup plan.
Operation description
Before you call this operation, make sure that you understand the billing methods and pricing of Database Backup (DBS).
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dbs:CreateAndStartBackupPlan |
create |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| BackupPlanId |
string |
No |
The ID of the backup plan. |
dbstooi0******* |
| Region |
string |
No |
The region where DBS is supported. For more information, see DescribeRegions. |
cn-hangzhou |
| InstanceClass |
string |
Yes |
The specification of the backup plan. Valid values:
Note
The higher the specification, the better the performance of backup and recovery. For more information, see Specifications. |
micro |
| DatabaseType |
string |
Yes |
The database type. Valid values:
|
MySQL |
| BackupMethod |
string |
Yes |
The backup method. Valid values:
|
logical |
| Period |
string |
No |
The billing cycle for the subscription instance. Valid values:
|
Year |
| UsedTime |
integer |
No |
The subscription duration. Valid values:
|
1 |
| PayType |
string |
No |
The payment method. Valid value: prepay: subscription |
postpay |
| DatabaseRegion |
string |
No |
The region where the database is located. |
cn-hangzhou |
| StorageRegion |
string |
No |
The storage region. |
cn-hangzhou |
| InstanceType |
string |
No |
The type of the database instance. Valid values:
|
RDS |
| StorageType |
string |
No |
This parameter is not yet available. |
无 |
| FromApp |
string |
No |
The source of the request. The default value is OpenApi. You do not need to set this parameter. |
OpenApi |
| SourceEndpointInstanceType |
string |
Yes |
The location of the database. Valid values:
|
RDS |
| SourceEndpointRegion |
string |
No |
The region where the database is located. Note
This parameter is required if SourceEndpoint.InstanceType is set to RDS, ECS, DDS, Express, or Agent. |
cn-hangzhou |
| SourceEndpointInstanceID |
string |
No |
The ID of the database instance. Note
This parameter is required if SourceEndpoint.InstanceType is set to RDS, ECS, DDS, or Express. |
rm-uf6wjk5xxxxxxxxxx |
| SourceEndpointIP |
string |
No |
The database endpoint. Note
This parameter is required if SourceEndpoint.InstanceType is set to express, agent, or other. |
rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com |
| SourceEndpointPort |
integer |
No |
The database port. Note
This parameter is required if SourceEndpoint.InstanceType is set to express, agent, other, or ECS. |
3306 |
| SourceEndpointDatabaseName |
string |
No |
The database name. Note
This parameter is required if the database type is PostgreSQL or MongoDB. |
testRDS |
| SourceEndpointUserName |
string |
No |
The database account. Note
This parameter is not required if the database type is Redis, or if the database location is agent and the database type is MSSQL. In other scenarios, this parameter is required. |
testRDS |
| SourceEndpointPassword |
string |
No |
The password. Note
This parameter is not required if the database type is Redis, or if the database location is agent and the database type is MSSQL. In other scenarios, this parameter is required. |
testPassword |
| BackupGatewayId |
integer |
No |
The ID of the backup gateway. Note
|
23313123312 |
| OSSBucketName |
string |
No |
The name of the Object Storage Service (OSS) bucket. Default: The system automatically generates a new name. |
TestOssBucket |
| BackupObjects |
string |
No |
The backup objects. |
[ { "DBName":"待备份库名", "SchemaName":"待备份 Schema 名", "TableIncludes":[{ "TableName":"待备份表表名" }], "TableExcludes":[{ "TableName":"待备份库名不需要备份表的表名" }] } ] |
| BackupPeriod |
string |
No |
The full backup cycle. Valid values:
Note
You can select multiple values. Separate them with commas (,). |
Monday |
| BackupStartTime |
string |
No |
The start time for the full backup. The time is in the HH:mm format and is in UTC. |
14:22 |
| EnableBackupLog |
boolean |
No |
Specifies whether to enable incremental log backup. Valid values:
|
true |
| BackupLogIntervalSeconds |
integer |
No |
The interval for incremental backups, in seconds (s). Note
This parameter is required only if you select physical backup. |
1000 |
| BackupRetentionPeriod |
integer |
No |
The retention period for backup data. Valid values: 0 to 1825. The default value is 730 days. |
730 |
| DuplicationInfrequentAccessPeriod |
integer |
No |
The time after which backup data is converted to Infrequent Access (IA) storage. The default value is 180 days. |
180 |
| DuplicationArchivePeriod |
integer |
No |
The time after which backup data is converted to archive storage. The default value is 365 days. |
365 |
| BackupPlanName |
string |
Yes |
The custom name of the backup plan. |
dbstooi0******* |
| SourceEndpointOracleSID |
string |
No |
The Oracle system ID (SID). This parameter is required if the database type is Oracle. |
test |
| BackupStorageType |
string |
No |
The built-in storage type:
|
无 |
| BackupSpeedLimit |
integer |
No |
The disk I/O limit, in KB/s. Note
This parameter is valid only for MySQL physical backups. |
262144 |
| BackupRateLimit |
integer |
No |
The network bandwidth throttling, in KB/s. The maximum value is 10 GB. Note
This parameter is valid only for MySQL physical backups. |
262144 |
| BackupStrategyType |
string |
No |
The backup strategy type. Valid values:
Note
The default value is simple. |
simple |
| CrossAliyunId |
string |
No |
The UID of the Alibaba Cloud account for cross-account backup. |
1648821913****** |
| CrossRoleName |
string |
No |
The name of the Resource Access Management (RAM) role for cross-account backup. |
test123 |
| ClientToken |
string |
No |
A client token that is used to ensure the idempotence of the request. This prevents duplicate requests. |
ASDASDASDSADASFCZXVZ |
| ResourceGroupId |
string |
No |
The ID of the resource group. |
rg-aekzecovzti**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response parameters. |
||
| HttpStatusCode |
integer |
The HTTP status code. |
200 |
| RequestId |
string |
The request ID. |
4F1888AC-1138-4995-B9FE-D2734F61C058 |
| CreateBackupSet |
boolean |
Indicates whether a backup set is created. Return values:
|
true |
| ErrCode |
string |
The error code. |
Param.NotFound |
| Success |
boolean |
Indicates whether the request was successful. |
true |
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| BackupPlanId |
string |
The ID of the backup plan. |
dbs1hvb0wwwe**** |
| OrderId |
string |
The order ID. |
2056157*** |
Examples
Success response
JSON format
{
"HttpStatusCode": 200,
"RequestId": "4F1888AC-1138-4995-B9FE-D2734F61C058",
"CreateBackupSet": true,
"ErrCode": "Param.NotFound",
"Success": true,
"ErrMessage": "The specified parameter %s value is not valid.",
"BackupPlanId": "dbs1hvb0wwwe****",
"OrderId": "2056157***"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Request.Forbidden | Have no Permissions |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.