All Products
Search
Document Center

:DescribeBackupPolicy

更新时间:Dec 26, 2025

Queries the automatic backup policy of a PolarDB cluster.

Debugging

Run this operation in OpenAPI Explorer to simplify signature calculation. After a successful call, OpenAPI Explorer automatically generates SDK sample code.

Request parameters

Name Type Required Example Description
Action String Yes DescribeBackupPolicy

The action to perform. Set the value to DescribeBackupPolicy.

DBClusterId String Yes pc-*************

The cluster ID.

Note Call the DescribeDBClusters operation to query information about all clusters in a specified region, including cluster IDs.

Returned Data

Name Type Example Description
PreferredBackupPeriod String Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday

The backup cycle. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
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 request ID.

PreferredBackupTime String 07:00Z-08:00Z

The time window in which to perform automatic backups. The time is in the HH:mmZ-HH:mmZ format and is in UTC.

BackupRetentionPolicyOnClusterDeletion String NONE

The policy for retaining backup sets when a cluster is deleted. Valid values:

  • ALL: Retains all backup sets permanently.
  • LATEST: Retains the last backup set permanently.
  • NONE (default): Does not retain any backup sets.
PreferredNextBackupTime String 2020-11-16T07:30Z

The time of the next automatic backup. The time is in the YYYY-MM-DDThh:mmZ format and is in UTC.

DataLevel2BackupRetentionPeriod String 0

The retention period of level-2 backups. Valid values:

  • 0: Disables the level-2 backup feature.
  • 30 to 7300: The retention period of level-2 backups in days.
  • -1: Retains level-2 backups permanently.
    Note The default value is 0, which means the level-2 backup feature is disabled.
BackupFrequency String Normal

The backup frequency. Valid values:

  • Normal (default): standard backup. Data is backed up once a day.
  • 2/24H: enhanced backup. Data is backed up every 2 hours.
  • 3/24H: enhanced backup. Data is backed up every 3 hours.
  • 4/24H: enhanced backup. Data is backed up every 4 hours.
Note
  • If you enable enhanced backup, all backups that are completed within the last 24 hours are retained. For backups that are older than 24 hours, the system retains only the first backup that is completed after 00:00 each day and deletes the rest.
  • If you enable enhanced backup, the PreferredBackupPeriod parameter is set to all days of the week (from Monday to Sunday) by default.
DataLevel1BackupFrequency String Normal

The backup frequency. Valid values:

  • Normal (default): standard backup. Data is backed up once a day.
  • 2/24H: high-frequency backup. Data is backed up every 2 hours.
  • 3/24H: high-frequency backup. Data is backed up every 3 hours.
  • 4/24H: high-frequency backup. Data is backed up every 4 hours.
Note
  • This parameter is not supported for PolarDB for Oracle or PolarDB for PostgreSQL clusters.
  • This parameter is not supported if your PolarDB for MySQL cluster is in a region that does not support cross-region backup. For more information about the regions that support cross-region backup, see Overview.
DataLevel1BackupPeriod String Monday,Tuesday

The backup cycle of level-1 backups. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note
  • At least two days must be specified. Separate multiple values with commas (,).
  • This parameter is not supported for PolarDB for Oracle or PolarDB for PostgreSQL clusters.
  • This parameter is not supported if your PolarDB for MySQL cluster is in a region that does not support cross-region backup. For more information about the regions that support cross-region backup, see Overview.
DataLevel1BackupTime String 15:00Z-16:00Z

The time window in which to perform automatic level-1 backups. The time is in the hh:mmZ-hh:mmZ format and is in UTC. The time window must be on the hour and last for one hour. For example, 14:00Z-15:00Z.

Note
  • This parameter is not supported for PolarDB for Oracle or PolarDB for PostgreSQL clusters.
  • This parameter is not supported if your PolarDB for MySQL cluster is in a region that does not support cross-region backup. For more information about the regions that support cross-region backup, see Overview.
DataLevel2BackupPeriod String Monday,Tuesday

The backup cycle of level-2 backups. Valid values:

  • Monday
  • Tuesday
  • Wednesday
  • Thursday
  • Friday
  • Saturday
  • Sunday
Note
  • At least two days must be specified. Separate multiple values with commas (,).
  • This parameter is not supported for PolarDB for Oracle or PolarDB for PostgreSQL clusters.
  • This parameter is not supported if your PolarDB for MySQL cluster is in a region that does not support cross-region backup. For more information about the regions that support cross-region backup, see Overview.
DataLevel2BackupAnotherRegionRetentionPeriod String 30

The retention period of cross-region level-2 backups. Valid values:

  • 0: Disables the cross-region level-2 backup feature.
  • 30 to 7300: The retention period of cross-region level-2 backups in days.
  • 1: Retains cross-region level-2 backups permanently.
    Note The default value is 0, which means the cross-region level-2 backup feature is disabled.
DataLevel2BackupAnotherRegionRegion String cn-hangzhou

The destination region for cross-region level-2 backups. For more information about the regions that support cross-region backup, see Overview.

Examples

Sample request

http(s)://polardb.aliyuncs.com/?Action=DescribeBackupPolicy
&DBClusterId=pc-*************
&Common request parameters

Sample 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

HttpCode Error code Error message Description
400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid. The specified DBClusterId parameter is invalid.
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId does not exist.

For a list of other error codes, see the Error Center.