You can call the SetBackupPolicy to set backup policy.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | SetBackupPolicy | The parameter specified by the system. Value: SetBackupPolicy. |
DrdsInstanceId | String | Yes | drds************ | The ID of the instance. |
PreferredBackupPeriod | String | No | 0 | The backup cycle. Valid values:
|
PreferredBackupStartTime | String | No | 11:30:30 | The start time of the backup. |
PreferredBackupEndTime | String | No | 12:30:30 | The end time of the backup. |
BackupMode | String | No | phy | The backup mode. Valid values:
|
BackupLevel | String | No | db | The level of the backup. Valid values:
|
BackupDbNames | String | No | test1,test2 | The databases to be backed up. Separate multiple databases with commas (,).
Note This parameter takes effect only when the backup level is database level.
|
BackupLog | String | No | 1 | Specifies whether to enable log Backup. Valid values:
|
DataBackupRetentionPeriod | String | No | 7 | The retention period of the backup data. Value range: 7 to 730. |
LogBackupRetentionPeriod | String | No | 7 | The log retention period. Valid values: 7 to 730. This value must be less than or equal to the number of data backup days. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | A3140FC7-B78B-4D8E-B0C8-926D28****** | The ID of the request. |
Result | String | Success | Indicates whether the backup policy was successfully configured. |
Success | Boolean | true | Indicates whether the database creation failure records were removed from the DRDS instance. |
Examples
Sample requests
http(s)://drds.aliyuncs.com/? Action=SetBackupPolicy
&DrdsInstanceId=drds************
&<Common request parameters>
Sample success responses
XML
format
<RequestId>A3140FC7-B78B-4D8E-B0C8-926D28******</RequestId>
<Result>success</Result>
<Success>true</Success>
JSON
format
{
"RequestId":"A3140FC7-B78B-4D8E-B0C8-926D28******",
"Result":"success",
"Success":true
}
Error codes
For a list of error codes, visit the API Error Center.