You can call this operation to configure a DBS backup schedule.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ConfigureBackupPlan |
The parameter specified by the system. Value: ConfigureBackupPlan. |
BackupPlanId | String | Yes | dbstooi0******* |
The ID of the backup plan. |
BackupPlanName | String | Yes | dbstooi0******* |
The name of the backup plan. |
SourceEndpointInstanceType | String | Yes | RDS |
The location of the database. Valid values:
|
SourceEndpointRegion | String | No | cn-hangzhou |
The region of the database. Note SourceEndpoint. InstanceType for RDS, ECS, DDS, Express, or Agent, this parameter is required.
|
SourceEndpointInstanceID | String | No | rm-uf6wjk5xxxxxxxxxx |
The ID of the ApsaraDB for RDS instance. Note SourceEndpoint. InstanceType if the value is RDS, ECS, DDS, or Express, this parameter is required.
|
SourceEndpointIP | String | No | rm-uf6wjk5xxxxxxx.mysql.rds.aliyuncs.com |
The endpoint used to connect the instance. Note SourceEndpoint. InstanceType is express, agent, or other. This parameter is required.
|
SourceEndpointPort | Integer | No | 3306 |
The port that is used to access the database of the primary MySQL server. Note SourceEndpoint. InstanceType is in the format of express, agent, other, or ECS. This parameter is required.
|
SourceEndpointDatabaseName | String | No | testRDS |
The name of the RDS database. Note The database type is PostgreSQL, MongoDB this parameter is required.
|
SourceEndpointUserName | String | No | testRDS |
The database account. Note The database type is Redis, or the database is located in agent this parameter is required when the database type is MSSQL.
|
SourceEndpointPassword | String | No | testPassword |
The password that is used to log on to the instance. Note The database type is Redis, or the database is located in agent this parameter is required when the database type is MSSQL.
|
BackupGatewayId | Long | No | 23313123312 |
The ID of the backup gateway. Note SourceEndpoint .InstanceType if you set this parameter to agent, this parameter is required.
|
OSSBucketName | String | No | TestOssBucket |
The name of the destination OSS bucket. The system automatically generates a new name by default. |
BackupObjects | String | No | [{"DBName":"the name of the database to be backed up", "SchemaName":"the name of the Schema to be backed up", "TableExcludes":[{"TableName":"the name of the table to be backed up" }], "TableExcludes":[{"TableName":"Name of the database to be backed up. Name of a table that does not need to be backed up" }] } ] |
The backup object. |
BackupPeriod | String | No | Monday |
The cycle of full Backup. Valid values:
|
BackupStartTime | String | No | 14:22 |
Full Backup start time, in the format HH:mm z(UTC time). |
EnableBackupLog | Boolean | No | true |
Indicates whether to enable incremental backup. Valid values:
|
BackupRetentionPeriod | Integer | No | 730 |
The retention time of backup data. Valid values: 0 to 1825. Default value: 730. |
DuplicationInfrequentAccessPeriod | Integer | No | 180 |
Convert the storage period to IA. The default value is 180. |
DuplicationArchivePeriod | Integer | No | 365 |
Convert the storage period to archive for cold backup. The default value is 365. |
SourceEndpointOracleSID | String | No | test |
The SID of the Oracle Database. This parameter is required when the database type is Oracle. |
BackupStorageType | String | No | None |
Built-in storage type:
|
RegionId | String | No | cn-hangzhou |
Region ID, call DescribeRegions to view the regions supported by DBS. |
ClientToken | String | No | ETnLKlblzczshOTUbOCzxxxxxxx |
The client token that is used to ensure the idempotency of the request. |
Response parameters
Parameter | Type | Sample response | Description |
---|---|---|---|
BackupPlanId | String | dbstooi01ex7ltj |
The ID of the backup plan. |
ErrCode | String | Param.NotFound |
The error code. |
ErrMessage | String | The specified parameter %s value is not valid. |
The returned message. |
HttpStatusCode | Integer | 200 |
The HTTP status code. |
RequestId | String | F1FB49D4-B504-47F1-9F43-D7EAB33FD1E4 |
The ID of the request. |
Success | Boolean | true |
Indicates whether the request succeeded. |
Examples
Sample requests
http(s)://dbs-api.cn-hangzhou.aliyuncs.com/? Action=ConfigureBackupPlan
&BackupPlanId=dbstooi01ex7ltj
&BackupPlanName=dbstooi01ex7ltj
&SourceEndpointInstanceType=rds
&<Common request parameters>
Sample success responses
XML
format
<ConfigureBackupPlanReponse>
<RequestId>D6E068C3-25BC-455A-85FE-45F0B22ECB1F</RequestId>
<HttpStatusCode>200</HttpStatusCode>
<BackupPlanId>dbs1h****usfa</BackupPlanId>
<Success>true</Success>
</ConfigureBackupPlanReponse>
JSON
format
{
"RequestId": "D6E068C3-25BC-455A-85FE-45F0B22ECB1F",
"HttpStatusCode": 200,
"BackupPlanId": "dbs1h****usfa",
"Success": true
}
Error code
For a list of error codes, visit the API Error Center.