CreateAndStartBackupPlan
Creates, configures, and starts a backup schedule.
Operation description
Before you call this operation, make sure that you fully 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 schedule. |
dbstooi0******* |
| Region |
string |
No |
The region supported by DBS. You can call the DescribeRegions operation to query the supported regions. |
cn-hangzhou |
| InstanceClass |
string |
Yes |
The specifications of the backup schedule. Valid values:
Note
Higher specifications provide better backup and recovery performance. For more information, see Specifications. |
micro |
| DatabaseType |
string |
Yes |
The type of the database. Valid values:
|
MySQL |
| BackupMethod |
string |
Yes |
The backup method. Valid values:
|
logical |
| Period |
string |
No |
The subscription period of the instance. Valid values:
|
Year |
| UsedTime |
integer |
No |
The subscription duration. Valid values:
|
1 |
| PayType |
string |
No |
The payment method. Valid values: prepay: Upfront (subscription). |
prepay |
| DatabaseRegion |
string |
No |
The region of the database. |
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 available. |
None |
| FromApp |
string |
No |
The source of the request. Default value: OpenApi. You do not need to specify this parameter. |
OpenApi |
| SourceEndpointInstanceType |
string |
Yes |
The location of the database. Valid values:
|
RDS |
| SourceEndpointRegion |
string |
No |
The region of the database. Note
This parameter is required if the SourceEndpoint.InstanceType parameter is set to RDS, ECS, DDS, Express, or Agent. |
cn-hangzhou |
| SourceEndpointInstanceID |
string |
No |
The database instance ID. Note
This parameter is required if the SourceEndpoint.InstanceType parameter is set to RDS, ECS, DDS, or Express. |
rm-uf6wjk5xxxxxxxxxx |
| SourceEndpointIP |
string |
No |
The database connection address. Note
This parameter is required if the SourceEndpoint.InstanceType parameter is set to express, agent, or other. |
rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com |
| SourceEndpointPort |
integer |
No |
The port number of the database. Note
This parameter is required if the SourceEndpoint.InstanceType parameter is set to express, agent, other, or ECS. |
3306 |
| SourceEndpointDatabaseName |
string |
No |
The name of the database. Note
This parameter is required if the database type is PostgreSQL or MongoDB. |
testRDS |
| SourceEndpointUserName |
string |
No |
The username of the database. Note
This parameter is optional 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 of the database. Note
This parameter is optional 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 OSS bucket. Default value: A new name is automatically generated by the system. |
TestOssBucket |
| BackupObjects |
string |
No |
The backup objects. |
[ { "DBName":"Name of the database to be backed up", "SchemaName":"Name of the schema to be backed up", "TableIncludes":[{ "TableName":"Name of the table to be backed up" }], "TableExcludes":[{ "TableName":"Name of the table that does not need to be backed up in the database" }] } ] |
| BackupPeriod |
string |
No |
The full backup cycle. Valid values:
Note
You can specify multiple values. Separate the values with commas (,). |
Monday |
| BackupStartTime |
string |
No |
The start time of the full backup. The time is in the HH:mm format and displayed in UTC. |
14:22 |
| EnableBackupLog |
boolean |
No |
Specifies whether to enable incremental log backup. Valid values:
|
true |
| BackupLogIntervalSeconds |
integer |
No |
The interval for incremental backup, in seconds. Note
This parameter is required only for physical backup. |
1000 |
| BackupRetentionPeriod |
integer |
No |
The retention period of the backup data. Valid values: 0 to 1825. Default value: 730. Unit: days. |
730 |
| DuplicationInfrequentAccessPeriod |
integer |
No |
The period after which the storage type is converted to Infrequent Access. Default value: 180. Unit: days. |
180 |
| DuplicationArchivePeriod |
integer |
No |
The period after which the storage type is converted to Archive. Default value: 365. Unit: days. |
365 |
| BackupPlanName |
string |
Yes |
The custom name of the backup schedule. |
dbstooi0******* |
| SourceEndpointOracleSID |
string |
No |
The Oracle SID. This parameter is required if the database type is Oracle. |
test |
| BackupStorageType |
string |
No |
The built-in storage type. Valid values:
|
None |
| BackupSpeedLimit |
integer |
No |
The disk I/O limit. Unit: KB/s. Note
This parameter takes effect only for MySQL physical backup. |
262144 |
| BackupRateLimit |
integer |
No |
The network bandwidth throttling. Unit: KB/s. Maximum value: 10 GB. Note
This parameter takes effect only for MySQL physical backup. |
262144 |
| BackupStrategyType |
string |
No |
The full backup cycle. Valid values:
Note
Default value: simple. |
simple |
| CrossAliyunId |
string |
No |
The UID of the Alibaba Cloud account for cross-account backup. |
1648821913****** |
| CrossRoleName |
string |
No |
The name of the RAM role for cross-account backup. |
test123 |
| ClientToken |
string |
No |
The client token that is used to ensure the idempotence of the request and prevent duplicate submissions. |
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 the backup set is enabled. Valid values:
|
true |
| ErrCode |
string |
The error code. |
Param.NotFound |
| Success |
boolean |
Indicates whether the request is successful. |
true |
| ErrMessage |
string |
The error message. |
The specified parameter %s value is not valid. |
| BackupPlanId |
string |
The ID of the backup schedule. |
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 | You are not authorized to perform the current operation. Contact the Alibaba Cloud account to grant permissions in the Resource Access Management (RAM) console before you perform this operation. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.