Queries the backup policy of a PolarDB-X instance.
Debugging
Request parameters
Parameter |
Type |
Required |
Example |
Description |
Action | String | Yes | DescribeBackupPolicy | The operation that you want to perform. Set the value to DescribeBackupPolicy. |
RegionId | String | Yes | cn-hangzhou | The region ID of the instance. |
DBInstanceName | String | Yes | pxc-******** | The name of the instance. |
Response parameters
Parameter |
Type |
Example |
Description |
Message | String | success | The returned message. If the request was successful, a success message is returned. If the request failed, an error message is returned. |
RequestId | String | B87E2AB3-B7C9-4394-9160-7F639F732031 | The request ID. |
Success | Boolean | true | Indicates whether the request was successful. |
Data | Array of Account | The returned data. |
|
LogLocalRetentionSpace | Integer | 30 | The maximum percentage of storage space that can be consumed by binary log (binlog) files. |
DBInstanceName | String | pxc-xxxxxx | The instance ID. |
BackupWay | String | P | The backup method. Valid values:
|
BackupPeriod | String | 1001000 | The days on which the system backs up data in a week. The value must be a string of seven digits to specify that backup is performed on at least two days in each week. Each digit specifies whether the system performs backup for the instance on a day of the week. The digit 0 specifies that backup is not performed on the day and the digit 1 specifies that the system performs backup for the instance on the day.
|
ForceCleanOnHighSpaceUsage | Integer | 1 | Indicates whether the system automatically deletes binlog files when the storage usage of the instance exceeds 80% or the remaining storage space of the instance is less than 50 GB. Valid values:
|
BackupType | String | 0 | The type of the backup. Valid values:
|
LocalLogRetention | Integer | 30 | The number of hours for which the log backups are retained on the instance. |
RemoveLogRetention | Integer | 7 | The number of days for which log backup files can be retained in the backup storage space that is provided by Alibaba Cloud. Valid values: 7 to 730. Default value: 7. |
BackupPlanBegin | String | 03:00Z | The point in time when the system starts to back up data. |
BackupSetRetention | Integer | 7 | The number of days for which the backup set is retained. |
IsEnabled | Integer | 1 | Indicates whether the log backup feature is enabled. Valid values:
|
ColdDataBackupInterval | Integer | 30 | The number of days between two backup operations on cold data. Valid values: 1 to 59. |
ColdDataBackupRetention | Integer | 30 | The number of days for which cold data backup files are retained. Valid values: 30 to 730. |
LocalLogRetentionNumber | Integer | 60 | The number of local binlog files that are retained. Default value: 60. Valid values: 6 to 100. |
IsCrossRegionDataBackupEnabled | Boolean | false | Indicates whether cross-region data backup is enabled. Default value: false. |
IsCrossRegionLogBackupEnabled | Boolean | false | Indicates whether cross-region log backup is enabled. Default value: false. |
DestCrossRegion | String | cn-shanghai | The region in which cross-region backups are stored. |
CrossRegionDataBackupRetention | Integer | 30 | The retention period of cross-region data backups. Unit: day. |
CrossRegionLogBackupRetention | Integer | 30 | The retention period of cross-region log backups. Unit: day. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeBackupPolicy
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&<Common request parameters>
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeBackupPolicyResponse>
<Message>success</Message>
<RequestId>B87E2AB3-B7C9-4394-9160-7F639F732031</RequestId>
<Success>true</Success>
<Data>
<LogLocalRetentionSpace>30</LogLocalRetentionSpace>
<DBInstanceName>pxc-xxxxxx</DBInstanceName>
<BackupWay>P</BackupWay>
<BackupPeriod>1001000</BackupPeriod>
<ForceCleanOnHighSpaceUsage>1</ForceCleanOnHighSpaceUsage>
<BackupType>0</BackupType>
<LocalLogRetention>30</LocalLogRetention>
<RemoveLogRetention>7</RemoveLogRetention>
<BackupPlanBegin>03:00Z</BackupPlanBegin>
<BackupSetRetention>7</BackupSetRetention>
<IsEnabled>1</IsEnabled>
<ColdDataBackupInterval>30</ColdDataBackupInterval>
<ColdDataBackupRetention>30</ColdDataBackupRetention>
<LocalLogRetentionNumber>60</LocalLogRetentionNumber>
<IsCrossRegionDataBackupEnabled>false</IsCrossRegionDataBackupEnabled>
<IsCrossRegionLogBackupEnabled>false</IsCrossRegionLogBackupEnabled>
<DestCrossRegion>cn-shanghai</DestCrossRegion>
<CrossRegionDataBackupRetention>30</CrossRegionDataBackupRetention>
<CrossRegionLogBackupRetention>30</CrossRegionLogBackupRetention>
</Data>
</DescribeBackupPolicyResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Message" : "success",
"RequestId" : "B87E2AB3-B7C9-4394-9160-7F639F732031",
"Success" : true,
"Data" : [ {
"LogLocalRetentionSpace" : 30,
"DBInstanceName" : "pxc-xxxxxx",
"BackupWay" : "P",
"BackupPeriod" : "1001000",
"ForceCleanOnHighSpaceUsage" : 1,
"BackupType" : "0",
"LocalLogRetention" : 30,
"RemoveLogRetention" : 7,
"BackupPlanBegin" : "03:00Z",
"BackupSetRetention" : 7,
"IsEnabled" : 1,
"ColdDataBackupInterval" : 30,
"ColdDataBackupRetention" : 30,
"LocalLogRetentionNumber" : 60,
"IsCrossRegionDataBackupEnabled" : false,
"IsCrossRegionLogBackupEnabled" : false,
"DestCrossRegion" : "cn-shanghai",
"CrossRegionDataBackupRetention" : 30,
"CrossRegionLogBackupRetention" : 30
} ]
}
Error codes
For a list of error codes, see Service error codes.