All Products
Search
Document Center

PolarDB:DescribeBackupPolicy

Last Updated:Sep 09, 2026

Queries the automatic backup policy of a PolarDB cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

polardb:DescribeBackupPolicy

get

*dbcluster

acs:polardb:{#regionId}:{#accountId}:dbcluster/{#dbclusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

Note

You can call the DescribeDBClusters operation to query the information about all clusters in a specified region, including cluster IDs.

pc-*************

Response elements

Element

Type

Description

Example

object

AdvancedDataPolicies

object

AdvancedDataPolicy

array<object>

The details of the advanced backup policy.

Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

object

AutoCreated

boolean

Indicates whether the backup policy is automatically generated by the system. Valid values:

  • true: The policy is generated by the system.

  • false: The policy is user-defined.

true

BakType

string

The backup type. Valid values:

  • F: full backup.

F

DestRegion

string

The destination region of the backup policy.

cn-hangzhou

DestType

string

The destination type of the backup policy. Valid values:

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: level-2 cross-region backup

level1

DumpAction

string

The method used to convert a level-1 backup to a level-2 backup. Valid values:

  • copy: copy

copy

FilterKey

string

The scheduling type. Valid values:

  • dayOfWeek: weekly scheduling

  • dayOfMonth: monthly scheduling

  • dayOfYear: yearly scheduling

  • backupInterval: fixed interval scheduling

Note

This parameter is returned only when FilterType is set to crontab.

dayOfWeek

FilterType

string

The filter type of the advanced policy. Valid values:

  • crontab: periodic scheduling

  • event: event-based scheduling

crontab

FilterValue

string

The backup cycle.

1,2,3,4,5,6,7

OnlyPreserveOneEachDay

boolean

The 24-hour backup data retention policy. Valid values:

  • true: Only the first backup set of the day is retained for backups that are older than 24 hours.

  • false: All backup sets are retained.

true

OnlyPreserveOneEachHour

boolean

The hourly backup data retention policy. Valid values:

  • true: Only the earliest backup set within each hour is retained for backups that are older than 1 hour.

  • false: All backup sets are retained.

true

PolicyId

string

The backup policy ID.

71930ac2e9f15e41615e10627c******

RetentionType

string

The retention type of the backup set. Valid values:

  • never: long-term retention (LTR)

  • delay: retention for a fixed number of days

delay

RetentionValue

string

The number of days for which backups are retained.

7

SrcRegion

string

The source region of the backup policy.

cn-beijing

SrcType

string

The source type of the backup policy. Valid values:

  • db: database cluster

  • level1: level-1 backup

  • level2: level-2 backup

  • level2Cross: level-2 cross-region backup

level1

StorageClass

string

AdvancedPolicyOption

string

The advanced backup policy option. Valid values:

  • enable: Advanced backup is enabled.

  • disable: Advanced backup is not enabled but can be enabled.

  • notSupport: Advanced backup is not supported.

Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

disable

BackupFrequency

string

The backup frequency. Valid values:

  • Normal (default): regular backup. A backup is performed once a day at a scheduled time.

  • 2/24H: enhanced backup. A backup is performed every 2 hours.

  • 3/24H: enhanced backup. A backup is performed every 3 hours.

  • 4/24H: enhanced backup. A backup is performed every 4 hours.

Note
  • After enhanced backup is enabled, all backups completed within 24 hours are retained. For backups older than 24 hours, only the first backup completed after 00:00 each day is retained, and all others are deleted.

  • After enhanced backup is enabled, the backup cycle parameter PreferredBackupPeriod is set to all days of the week by default (Monday through Sunday).

Normal

BackupPolicyLevel

string

The current backup policy level. Valid values:

  • Normal: regular backup

  • Advanced: advanced backup

Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

Normal

BackupRetentionPolicyOnClusterDeletion

string

Specifies whether to retain backups when the cluster is deleted. Valid values:

  • ALL: All backups are retained with long-term retention (LTR).

  • LATEST: The last backup is retained with long-term retention (LTR).

  • NONE (default): No backups are retained.

NONE

DataLevel1BackupFrequency

string

The backup frequency. Valid values:

  • Normal (default): regular backup. A backup is performed once a day at a scheduled time.

  • 2/24H: high-frequency backup. A backup is performed every 2 hours.

  • 3/24H: high-frequency backup. A backup is performed every 3 hours.

  • 4/24H: high-frequency backup. A backup is performed every 4 hours.

Note
    • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

    • If the region of your PolarDB for MySQL cluster does not support the cross-region backup feature, this parameter is not supported. For the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

Normal

DataLevel1BackupPeriod

string

The level-1 backup cycle. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Note
    • At least two days must be selected. Separate multiple values with commas (,).

    • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

    • If the region of your PolarDB for MySQL cluster does not support the cross-region backup feature, this parameter is not supported. For the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

Monday,Tuesday

DataLevel1BackupRetentionPeriod

string

The retention period of level-1 backups. Valid values: 3 to 14. Unit: days.

Note

After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

7

DataLevel1BackupTime

string

The time period during which automatic backups are performed. The value is in the hh:mmZ-hh:mmZ format (UTC). The start and end times must be on the hour and exactly 1 hour apart. Example: 14:00Z-15:00Z.

Note
  • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

  • If the region of your PolarDB for MySQL cluster does not support the cross-region backup feature, this parameter is not supported. For the regions that support cross-region backup, see Overview.

15:00Z-16:00Z

DataLevel2BackupAnotherRegionRegion

string

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

Note

After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

cn-hangzhou

DataLevel2BackupAnotherRegionRetentionPeriod

string

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

  • 0: The level-2 backup feature is shutdown.

  • 30 to 7300: The retention epoch of level-2 backups. Unit: days.

  • -1: Level-2 backups are retained with long-term retention (LTR).

Note
    • When a cluster is created, the default value is 0, which means the cross-region backup feature for level-2 backups is shutdown.

    • After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

30

DataLevel2BackupPeriod

string

The level-2 backup cycle. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Note
    • At least two days must be selected. Separate multiple values with commas (,).

    • This parameter is not supported for PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

    • If the region of your PolarDB for MySQL cluster does not support the cross-region backup feature, this parameter is not supported. For the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

Monday,Tuesday

DataLevel2BackupRetentionPeriod

string

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

  • 0: The level-2 backup feature is shutdown.

  • 30 to 7300: The retention epoch of level-2 backups. Unit: days.

  • -1: Level-2 backups are retained with long-term retention (LTR).

Note
    • When a cluster is created, the default value is 0, which means the level-2 backup feature is shutdown.

    • After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

0

EnableCrossRegionImmutableBackup

boolean

Indicates whether immutable cross-region backup is enabled.

EnableImmutableBackup

boolean

Indicates whether immutable backup is enabled.

PreferredBackupPeriod

string

The data backup cycle. Valid values:

  • Monday

  • Tuesday

  • Wednesday

  • Thursday

  • Friday

  • Saturday

  • Sunday

Note

After advanced backup is enabled, use the AdvancedDataPolicies parameter instead of this parameter.

Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday

PreferredBackupTime

string

The time period during which automatic backups are performed. The value is in the HH:mmZ-HH:mmZ format (UTC).

07:00Z-08:00Z

PreferredNextBackupTime

string

The time of the next backup. The value is in the YYYY-MM-DDThh:mmZ format (UTC).

2020-11-16T07:30Z

RequestId

string

The request ID.

EADFCE0F-9FB5-4685-B395-1440B******

Examples

Success response

JSON format

{
  "AdvancedDataPolicies": {
    "AdvancedDataPolicy": [
      {
        "AutoCreated": true,
        "BakType": "F",
        "DestRegion": "cn-hangzhou",
        "DestType": "level1",
        "DumpAction": "copy",
        "FilterKey": "dayOfWeek",
        "FilterType": "crontab",
        "FilterValue": "1,2,3,4,5,6,7",
        "OnlyPreserveOneEachDay": true,
        "OnlyPreserveOneEachHour": true,
        "PolicyId": "71930ac2e9f15e41615e10627c******\n",
        "RetentionType": "delay",
        "RetentionValue": "7",
        "SrcRegion": "cn-beijing",
        "SrcType": "level1",
        "StorageClass": ""
      }
    ]
  },
  "AdvancedPolicyOption": "disable",
  "BackupFrequency": "Normal",
  "BackupPolicyLevel": "Normal",
  "BackupRetentionPolicyOnClusterDeletion": "NONE",
  "DataLevel1BackupFrequency": "Normal",
  "DataLevel1BackupPeriod": "Monday,Tuesday",
  "DataLevel1BackupRetentionPeriod": "7",
  "DataLevel1BackupTime": "15:00Z-16:00Z",
  "DataLevel2BackupAnotherRegionRegion": "cn-hangzhou",
  "DataLevel2BackupAnotherRegionRetentionPeriod": "30",
  "DataLevel2BackupPeriod": "Monday,Tuesday",
  "DataLevel2BackupRetentionPeriod": "0",
  "EnableCrossRegionImmutableBackup": false,
  "EnableImmutableBackup": false,
  "PreferredBackupPeriod": "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday",
  "PreferredBackupTime": "07:00Z-08:00Z",
  "PreferredNextBackupTime": "2020-11-16T07:30Z",
  "RequestId": "EADFCE0F-9FB5-4685-B395-1440B******"
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid.
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist in the current record.
404 InvalidDBClusterId.NotFound The DBInstanceId provided does not exist in our records. The specified DBClusterId parameter does not exist in the current record.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.