All Products
Search
Document Center

PolarDB:DescribeBackupPolicy

Last Updated:Oct 22, 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 all clusters in the target 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 by 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 customized by the user.

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 data retention policy.

  • true: Only the first backup set of the day is retained after 24 hours.

  • false: All backup sets are retained.

true

OnlyPreserveOneEachHour

boolean

The hourly data retention policy. Valid values:

  • true: Only the earliest backup set within each hour is retained after 1 hour.

  • false: All backup sets are retained.

true

PolicyId

string

The ID of the backup policy.

71930ac2e9f15e41615e10627c******

RetentionType

string

The retention epoch 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

The storage class used by the advanced backup policy.

AdvancedPolicyOption

string

The advanced backup policy option. Valid values:

  • enable: Advanced backup is enabled.

  • disable: Advanced backup is disabled. You can enable it.

  • notSupport: Advanced backup is not supported.

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

disable

BackupFrequency

string

The backup frequency. Valid values:

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

  • 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, the system retains only the first backup completed after 00:00 each day and deletes the rest.

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

Normal

BackupPolicyLevel

string

The current backup policy level. Valid values:

  • Normal: Standard backup.

  • Advanced: Advanced backup.

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

Normal

BackupRetentionPolicyOnClusterDeletion

string

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

  • ALL: Retain all backups for long-term retention (LTR).

  • LATEST: Retain the latest backup for long-term retention (LTR).

  • NONE (default): Do not retain backup sets.

NONE

DataLevel1BackupFrequency

string

The backup frequency. Valid values:

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

  • 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 by PolarDB for PostgreSQL (Compatible with Oracle) or PolarDB for PostgreSQL.

    • If the region where your PolarDB for MySQL cluster resides does not support cross-region backup, this parameter is not supported. For more information about the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

Normal

DataLevel1BackupPeriod

string

The level-1 backup cycle. Valid values:

  • Monday: Monday.

  • Tuesday: Tuesday.

  • Wednesday: Wednesday.

  • Thursday: Thursday.

  • Friday: Friday.

  • Saturday: Saturday.

  • Sunday: Sunday.

Note
    • You must select at least two days. Separate multiple values with commas (,).

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

    • If the region where your PolarDB for MySQL cluster resides does not support cross-region backup, this parameter is not supported. For more information about the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

Monday,Tuesday

DataLevel1BackupRetentionPeriod

string

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

Note

After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

7

DataLevel1BackupTime

string

The time period during which automatic backups are performed. The time is in the hh:mmZ-hh:mmZ format (UTC time). The specified time must be on the hour with a 1-hour interval, such as 14:00Z-15:00Z.

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

  • If the region where your PolarDB for MySQL cluster resides does not support cross-region backup, this parameter is not supported. For more information about the regions that support cross-region backup, see Overview.

15:00Z-16:00Z

DataLevel2BackupAnotherRegionRegion

string

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

Note

After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

cn-hangzhou

DataLevel2BackupAnotherRegionRetentionPeriod

string

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

  • 0: Shutdown the level-2 backup feature.

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

  • -1: Long-term retention (LTR) of level-2 backups.

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

    • After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

30

DataLevel2BackupPeriod

string

The level-2 backup cycle. Valid values:

  • Monday: Monday.

  • Tuesday: Tuesday.

  • Wednesday: Wednesday.

  • Thursday: Thursday.

  • Friday: Friday.

  • Saturday: Saturday.

  • Sunday: Sunday.

Note
    • You must select at least two days. Separate multiple values with commas (,).

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

    • If the region where your PolarDB for MySQL cluster resides does not support cross-region backup, this parameter is not supported. For more information about the regions that support cross-region backup, see Overview.

    • After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

Monday,Tuesday

DataLevel2BackupRetentionPeriod

string

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

  • 0: Shutdown the level-2 backup feature.

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

  • -1: Long-term retention (LTR) of level-2 backups.

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

    • After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

0

EnableCrossRegionImmutableBackup

boolean

Indicates whether the immutable backup for cross-region backup is enabled.

EnableImmutableBackup

boolean

Indicates whether immutable backup is enabled.

PreferredBackupPeriod

string

The data backup cycle. Valid values:

  • Monday: Monday.

  • Tuesday: Tuesday.

  • Wednesday: Wednesday.

  • Thursday: Thursday.

  • Friday: Friday.

  • Saturday: Saturday.

  • Sunday: Sunday.

Note

After advanced backup is enabled, do not use this parameter. Use the AdvancedDataPolicies parameter instead.

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

PreferredBackupTime

string

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

07:00Z-08:00Z

PreferredNextBackupTime

string

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

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.