All Products
Search
Document Center

Data Management:DescribeBackupPolicy

Last Updated:Oct 12, 2026

Queries the backup policy of a PolarDB instance.

Operation description

Supported engines

PolarDB for MySQL

Note

This operation is currently available only to specific customers. To request access, join the DBS customer consultation DingTalk group (group ID: 35585947).

Related documentation

Backup policies for PolarDB for MySQL

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

dbs:DescribeBackupPolicy

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionCode

string

No

The region where the backup set is located.

cn-beijing

InstanceName

string

No

The PolarDB instance ID.

pc-2ze3nrr64c5****

Response elements

Element

Type

Description

Example

object

The response parameter details.

RequestId

string

The request ID.

54A63B3B-AA10-1CC3-A6BB-6CCE98D19628

Message

string

The returned message.

instanceName can not be empty.

Data

object

The backup policy details.

PreferredBackupDate

string

The backup cycle for basic backups. The value is a 7-digit string returned from left to right, where each digit corresponds to a day of the week from Monday to Sunday. A value of 1 indicates that backups are performed, and 0 indicates that backups are not performed.

1010101

PreferredBackupWindowBegin

string

The start time of the basic backup window.

23:00Z

PreferredBackupWindow

string

The basic backup window.

23:00Z-24:00Z

BackupRetentionPeriod

integer

The basic backup retention period. If the advanced backup policy is enabled, this parameter indicates the maximum retention period in the level-1 backup policy.

7

BackupRetentionPolicyOnClusterDeletion

string

The archive backup data retention policy for deleted instances. Valid values:

  • NONE: No backups are retained.

  • LATEST: Only the last backup is retained.

  • ALL: All backups are retained.

LATEST

HighFrequencyBakInterval

integer

The high-frequency backup interval in minutes. For example, a value of 120 indicates that a backup is performed every two hours.

120

BackupPriority

integer

The backup policy for secondary instances. Valid values:

  • 1: Backups are preferentially performed on secondary instances.

  • 2: Backups are forcibly performed on the primary instance.

Note

This parameter applies only to ApsaraDB RDS for SQL Server instances. For other database engines, the value 0 is returned.

0

EnableLogBackup

integer

Indicates whether log backup is enabled. Valid values:

  • 1: Enabled.

  • 0: Disabled.

1

LogBackupRetention

integer

The log backup retention period.

7

LogBackupLocalRetentionNumber

integer

The number of retained binary log files.

10

EnableBackup

integer

Indicates whether backup is enabled.

1

LocalLogRetentionSpace

integer

The maximum space usage of binary logs.

30

HighSpaceUsageProtection

string

Indicates whether to forcibly clean up logs when the instance space usage exceeds 80% or the remaining space is less than 5 GB. Valid values:

  • Disable: Logs are not cleaned up.

  • Enable: Logs are cleaned up.

Enable

Category

string

Indicates whether backup within seconds is enabled. Valid values:

  • Flash: Backup within seconds is enabled.

  • Standard: Standard backup is used.

Note

This parameter applies only to MySQL.

Standard

IncBackupInterval

integer

The high-frequency incremental backup interval.

-1

EnableIncBackup

integer

Indicates whether incremental backup is enabled.

0

BackupMethod

string

The backup method. Valid values:

  • Physical: Physical backup.

  • Snapshot: Snapshot backup.

Physical

AdvanceLogPolicies

array<object>

The details of the advanced log backup policies.

object

The policy details.

PolicyId

string

The backup policy ID.

dc13b153acc91141789122c23835****

SrcType

string

The source type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

level1

SrcRegion

string

The source region of the backup policy.

cn-beijing

DestType

string

The destination type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

level1

DestRegion

string

The destination region of the backup policy.

cn-shanghai

EnableLogBackup

integer

A reserved parameter. Ignore this parameter.

1

LogRetentionType

string

The log backup retention type. Valid values:

  • never: Never expires.

  • delay: Expires after a fixed number of days.

delay

LogRetentionValue

string

The log backup retention period.

3

FilterType

string

The filter type of the advanced policy. Valid values:

  • crontab: Periodic scheduling.

  • event: Event-based scheduling.

crontab

FilterKey

string

The scheduling type. Valid values:

  • dayOfWeek: Scheduled by week.

  • dayOfMonth: Scheduled by month.

  • dayOfYear: Scheduled by year.

  • backupInterval: Scheduled at a fixed interval.

Note

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

dayOfWeek

FilterValue

string

The backup cycle.

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

AdvanceDataPolicies

array<object>

The details of the advanced data backup policies.

object

The policy details.

PolicyId

string

The advanced policy ID.

71930ac2e9f15e41615e10627c******

FilterType

string

The filter type of the advanced policy. Valid values:

  • crontab: Periodic scheduling.

  • event: Event-based scheduling.

crontab

FilterKey

string

The scheduling type. Valid values:

  • dayOfWeek: Scheduled by week.

  • dayOfMonth: Scheduled by month.

  • dayOfYear: Scheduled by year.

  • backupInterval: Scheduled at a fixed interval.

Note

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

dayOfWeek

FilterValue

string

The backup cycle.

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

DumpAction

string

The dump policy. Valid values:

  • copy: Copy.

  • move: Move.

copy

RetentionType

string

The retention period type of the backup set. Valid values:

  • never: Never expires.

  • delay: Expires after a fixed number of days.

delay

RetentionValue

string

The number of days before expiration.

7

SrcType

string

The source type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

db

SrcRegion

string

The source region of the backup policy.

cn-beijing

DestType

string

The destination type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

level1

DestRegion

string

The destination region of the backup policy.

cn-beijing

BakType

string

The backup type. Valid values:

  • F: Full backup.

  • L: Log backup.

F

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

StorageClass

string

The data storage class.

STANDARD

AdvanceIncPolicies

array<object>

The filter type for advanced policies. Valid values:

  • Crontab: Periodic scheduling.

  • Event: Event-based scheduling.

object

The incremental backup policy.

PolicyId

string

The ID of the advanced policy.

smp-l0bfdmlr4c***

FilterType

string

The filter type for advanced policies. Valid values:

  • Crontab: Periodic scheduling.

  • Event: Event-based scheduling.

crontab

FilterKey

string

The scheduling type. This parameter is valid only when the filterType parameter is set to crontab. Valid values:

  • dayOfWeek: Weekly scheduling.

  • dayOfMonth: Monthly scheduling.

  • dayOfYear: Yearly scheduling.

  • backupInterval: Fixed-interval scheduling.

dayOfMonth

FilterValue

string

The value of the specific filter.

1

DumpAction

string

The dump action. Valid values:

  • Copy: Copy.

  • Move: Dump.

Copy

RetentionType

string

The retention period type. Valid values:

  • Never: Never expires.

  • Delay: Expires after a fixed number of days.

delay

RetentionValue

string

The number of days before expiration.

365

SrcType

string

The source type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

db

SrcRegion

string

The source region of the backup policy.

cn-hangzhou

DestType

string

The destination type of the backup policy. Valid values:

  • db: Database.

  • level1: Level-1 backup.

  • level2: Level-2 backup.

  • level2Cross: Cross-region level-2 backup.

db

DestRegion

string

The destination region of the backup policy.

cn-hangzhou

BakType

string

The backup type. F indicates a full backup, and L indicates a log backup.

F

AutoCreated

boolean

Indicates whether the policy is automatically generated by the system.

true

PreferredNextBackupTime

string

The expected next execution time for the basic backup. The time is in the yyyy-MM-ddTHH:mmZ format (UTC).

2025-07-08T16:05Z

EnablePitrProtection

boolean

Indicates whether point-in-time recovery (PITR) protection is enabled.

false

LogBackupLocalRetention

integer

The retention period for binary logs, in seconds.

7

ColdRetention

integer

The retention period for cold archives, in days.

30

ColdKeepPolicy

integer

The data retention policy for cold archives.

1

ColdKeepCount

integer

The number of cold archives to retain.

1

ErrMessage

string

The error message.

The specified parameter %s value is not valid.

Code

string

The status code.

Success

Success

string

Indicates whether the request is successful. Valid values:

  • true: The request is successful.

  • false: The request fails.

true

ErrCode

string

The error code.

Success

Examples

Success response

JSON format

{
  "RequestId": "54A63B3B-AA10-1CC3-A6BB-6CCE98D19628",
  "Message": "instanceName can not be empty.",
  "Data": {
    "PreferredBackupDate": "1010101",
    "PreferredBackupWindowBegin": "23:00Z",
    "PreferredBackupWindow": "23:00Z-24:00Z",
    "BackupRetentionPeriod": 7,
    "BackupRetentionPolicyOnClusterDeletion": "LATEST",
    "HighFrequencyBakInterval": 120,
    "BackupPriority": 0,
    "EnableLogBackup": 1,
    "LogBackupRetention": 7,
    "LogBackupLocalRetentionNumber": 10,
    "EnableBackup": 1,
    "LocalLogRetentionSpace": 30,
    "HighSpaceUsageProtection": "Enable",
    "Category": "Standard",
    "IncBackupInterval": -1,
    "EnableIncBackup": 0,
    "BackupMethod": "Physical",
    "AdvanceLogPolicies": [
      {
        "PolicyId": "dc13b153acc91141789122c23835****",
        "SrcType": "level1",
        "SrcRegion": "cn-beijing",
        "DestType": "level1",
        "DestRegion": "cn-shanghai",
        "EnableLogBackup": 1,
        "LogRetentionType": "delay",
        "LogRetentionValue": "3",
        "FilterType": "crontab",
        "FilterKey": "dayOfWeek",
        "FilterValue": "1,2,3,4,5,6,7"
      }
    ],
    "AdvanceDataPolicies": [
      {
        "PolicyId": "71930ac2e9f15e41615e10627c******",
        "FilterType": "crontab",
        "FilterKey": "dayOfWeek",
        "FilterValue": "1,2,3,4,5,6,7",
        "DumpAction": "copy",
        "RetentionType": "delay",
        "RetentionValue": "7",
        "SrcType": "db",
        "SrcRegion": "cn-beijing",
        "DestType": "level1",
        "DestRegion": "cn-beijing",
        "BakType": "F",
        "AutoCreated": true,
        "StorageClass": "STANDARD"
      }
    ],
    "AdvanceIncPolicies": [
      {
        "PolicyId": "smp-l0bfdmlr4c***",
        "FilterType": "crontab",
        "FilterKey": "dayOfMonth",
        "FilterValue": "1",
        "DumpAction": "Copy",
        "RetentionType": "delay",
        "RetentionValue": "365",
        "SrcType": "db",
        "SrcRegion": "cn-hangzhou",
        "DestType": "db",
        "DestRegion": "cn-hangzhou",
        "BakType": "F",
        "AutoCreated": true
      }
    ],
    "PreferredNextBackupTime": "2025-07-08T16:05Z",
    "EnablePitrProtection": false,
    "LogBackupLocalRetention": 7,
    "ColdRetention": 30,
    "ColdKeepPolicy": 1,
    "ColdKeepCount": 1
  },
  "ErrMessage": "The specified parameter %s value is not valid.     ",
  "Code": "Success",
  "Success": "true",
  "ErrCode": "Success"
}

Error codes

HTTP status code

Error code

Error message

Description

403 Request.Forbidden Have no Permissions

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.