Modifies the automatic backup policy of a PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ModifyBackupPolicy | The operation that you want to perform. Set the value to ModifyBackupPolicy. |
DBClusterId | String | Yes | pc-bp13wz9586voc**** | The ID of the cluster. Note You can call the DescribeDBClusters operation to query information about all your PolarDB clusters that are deployed in a specified region. The returned information includes the ID of each cluster. |
PreferredBackupTime | String | No | 15:00Z-16:00Z | The time period during which automatic backup is performed. The value must be in the |
PreferredBackupPeriod | String | No | Monday,Tuesday | The backup cycle. Valid values:
Note
|
DataLevel1BackupRetentionPeriod | String | No | 3 | The retention period of level-1 backups. Valid values: 3 to 14. Unit: days. |
DataLevel2BackupRetentionPeriod | String | No | 0 | The retention period of level-2 backups. Valid values:
|
BackupRetentionPolicyOnClusterDeletion | String | No | NONE | Specifies whether to retain backups when you delete a cluster. Valid values:
Note The default value is NONE. |
BackupFrequency | String | No | Normal | The backup frequency. Default value: Normal. Valid values:
Note
|
DataLevel1BackupFrequency | String | No | Normal | The frequency of level-1 backups. Default value: Normal. Valid values:
Note
|
DataLevel1BackupTime | String | No | 15:00Z-16:00Z | The time period during which automatic backup for level-1 backups is performed. The value must be in the Note
|
DataLevel1BackupPeriod | String | No | Monday,Tuesday | The backup cycle of level-1 backups. Valid values:
Note
|
DataLevel2BackupPeriod | String | No | Monday,Tuesday | The backup cycle of level-2 backups. Valid values:
Note
|
DataLevel2BackupAnotherRegionRegion | String | No | cn-hangzhou | The region where the cross-region level-2 backup is stored. For information about regions that support the cross-region backup feature, see Overview. |
DataLevel2BackupAnotherRegionRetentionPeriod | String | No | 30 | The retention period of cross-region level-2 backups. Valid values:
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | C5A5DF0E-5968-4DC1-882E-AC2FE7****** | The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=ModifyBackupPolicy
&DBClusterId=pc-bp13wz9586voc****
&PreferredBackupTime=15:00Z-16:00Z
&PreferredBackupPeriod=Monday,Tuesday
&DataLevel1BackupRetentionPeriod=3
&DataLevel2BackupRetentionPeriod=0
&BackupRetentionPolicyOnClusterDeletion=NONE
&BackupFrequency=Normal
&DataLevel1BackupFrequency=Normal
&DataLevel1BackupTime=15:00Z-16:00Z
&DataLevel1BackupPeriod=Monday,Tuesday
&DataLevel2BackupPeriod=Monday,Tuesday
&DataLevel2BackupAnotherRegionRegion=cn-hangzhou
&DataLevel2BackupAnotherRegionRetentionPeriod=30
&<Common request parameters>
Sample success response
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ModifyBackupPolicyResponse>
<RequestId>C5A5DF0E-5968-4DC1-882E-AC2FE7******</RequestId>
</ModifyBackupPolicyResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "C5A5DF0E-5968-4DC1-882E-AC2FE7******"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDataLevel1BackupRetentionPeriod.Malformed | The specified parameter DataLevel1BackupRetentionPeriod is not valid. | The error message returned because the value of the DataLevel1BackupRetentionPeriod parameter is invalid. |
400 | InvalidDataLevel2BackupRetentionPeriod.Malformed | The specified parameter DataLevel2BackupRetentionPeriod is not valid. | The error message returned because the value of the DataLevel2BackupRetentionPeriod parameter is invalid. |
400 | InvalidBackupRetentionPeriod.Malformed | The specified parameter BackupRetentionPeriod is not valid. | The error message returned because the value of the BackupRetentionPeriod parameter is invalid. |
400 | InvalidBackupFrequency.Malformed | The specified parameter BackupFrequency is not valid. | The error message returned because the value of the BackupFrequency parameter is invalid. |
400 | InvalidPreferredBackupPeriod.Malformed | The specified parameter PreferredBackupPeriod is not valid. | The error message returned because the value of the PreferredBackupPeriod parameter is invalid. |
400 | InvalidDataLevel2BackupPeriod.Malformed | The specified parameter DataLevel2BackupPeriod is not valid. | The error message returned because the value of the DataLevel2BackupPeriod parameter is invalid. |
403 | IncorrectBackupPolicy | Current DB type does not support low frequency backupPolicy operation. | The error message returned because the database does not support the standard backup operation. |
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId does not exist in the current record. |
For a list of error codes, visit the API Error Center.