Queries the automatic backup policy of a PolarDB cluster.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeBackupPolicy | The operation that you want to perform. Set the value to DescribeBackupPolicy. |
DBClusterId | String | Yes | pc-************* | 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. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
PreferredBackupPeriod | String | Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday | The backup cycle. Valid values:
|
DataLevel1BackupRetentionPeriod | String | 7 | The retention period of level-1 backups. Valid values: 3 to 14. Unit: days. |
RequestId | String | EADFCE0F-9FB5-4685-B395-1440B****** | The ID of the request. |
PreferredBackupTime | String | 07:00Z-08:00Z | The time period when automatic backups are performed. The format is |
BackupRetentionPolicyOnClusterDeletion | String | NONE | Indicates whether backups are retained when you delete a cluster. Valid values:
|
PreferredNextBackupTime | String | 2020-11-16T07:30Z | The time point when the next automatic backup will be performed. The format is |
DataLevel2BackupRetentionPeriod | String | 0 | The retention period of level-2 backups. Valid values:
|
BackupFrequency | String | Normal | The backup frequency. Valid values:
Note
|
DataLevel1BackupFrequency | String | Normal | The frequency of level-1 backups. Valid values:
Note
|
DataLevel1BackupPeriod | String | Monday,Tuesday | The backup cycle of level-1 backups. Valid values:
Note
|
DataLevel1BackupTime | String | 15:00Z-16:00Z | The time period during which automatic backup for level-1 backup is performed. The format is Note
|
DataLevel2BackupPeriod | String | Monday,Tuesday | The backup cycle of level-2 backups. Valid values:
Note
|
DataLevel2BackupAnotherRegionRetentionPeriod | String | 30 | The retention period of cross-region level-2 backups. Valid values:
|
DataLevel2BackupAnotherRegionRegion | String | 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. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DescribeBackupPolicy
&DBClusterId=pc-*************
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeBackupPolicyResponse>
<PreferredBackupPeriod>Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday</PreferredBackupPeriod>
<DataLevel1BackupRetentionPeriod>7</DataLevel1BackupRetentionPeriod>
<RequestId>EADFCE0F-9FB5-4685-B395-1440B******</RequestId>
<PreferredBackupTime>07:00Z-08:00Z</PreferredBackupTime>
<BackupRetentionPolicyOnClusterDeletion>NONE</BackupRetentionPolicyOnClusterDeletion>
<PreferredNextBackupTime>2020-11-16T07:30Z</PreferredNextBackupTime>
<DataLevel2BackupRetentionPeriod>0</DataLevel2BackupRetentionPeriod>
<BackupFrequency>Normal</BackupFrequency>
<DataLevel1BackupFrequency>Normal</DataLevel1BackupFrequency>
<DataLevel1BackupPeriod>Monday,Tuesday</DataLevel1BackupPeriod>
<DataLevel1BackupTime>15:00Z-16:00Z</DataLevel1BackupTime>
<DataLevel2BackupPeriod>Monday,Tuesday</DataLevel2BackupPeriod>
<DataLevel2BackupAnotherRegionRetentionPeriod>30</DataLevel2BackupAnotherRegionRetentionPeriod>
<DataLevel2BackupAnotherRegionRegion>cn-hangzhou</DataLevel2BackupAnotherRegionRegion>
</DescribeBackupPolicyResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"PreferredBackupPeriod" : "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
"DataLevel1BackupRetentionPeriod" : "7",
"RequestId" : "EADFCE0F-9FB5-4685-B395-1440B******",
"PreferredBackupTime" : "07:00Z-08:00Z",
"BackupRetentionPolicyOnClusterDeletion" : "NONE",
"PreferredNextBackupTime" : "2020-11-16T07:30Z",
"DataLevel2BackupRetentionPeriod" : "0",
"BackupFrequency" : "Normal",
"DataLevel1BackupFrequency" : "Normal",
"DataLevel1BackupPeriod" : "Monday,Tuesday",
"DataLevel1BackupTime" : "15:00Z-16:00Z",
"DataLevel2BackupPeriod" : "Monday,Tuesday",
"DataLevel2BackupAnotherRegionRetentionPeriod" : "30",
"DataLevel2BackupAnotherRegionRegion" : "cn-hangzhou"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidDBClusterId.Malformed | The specified parameter DBClusterId is not valid. | The error message returned because the specified DBClusterId parameter is invalid. |
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.