All Products
Search
Document Center

PolarDB:UpdateBackupPolicy

Last Updated:Sep 10, 2026

Modifies the backup policy of an instance.

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

polardbx:UpdateBackupPolicy

none

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

The region ID.

cn-hangzhou

DBInstanceName

string

Yes

The instance ID.

pxc-hzjasdyuoo

BackupPeriod

string

No

The backup cycle. You must specify at least 2 days. The value is a 7-digit number. From left to right, each digit represents whether backup is enabled from Monday to Sunday. A value of 0 indicates that backup is disabled, and a value of 1 indicates that backup is enabled:

  • First digit: Monday

  • Second digit: Tuesday

  • Third digit: Wednesday

  • Fourth digit: Thursday

  • Fifth digit: Friday

  • Sixth digit: Saturday

  • Seventh digit: Sunday

1001000

BackupPlanBegin

string

No

The daily backup start time in UTC.

03:00Z

BackupSetRetention

integer

No

The retention period of backup sets. Unit: days.

30

BackupType

string

No

The backup type. Currently, only "0" is supported, which indicates fast backup.

0

BackupWay

string

No

The backup method. Valid values:

  • P: physical backup.

  • L: logical backup.

P

ForceCleanOnHighSpaceUsage

integer

No

Specifies whether to forcibly clean up binary logs when the total space usage of the instance exceeds 80% or the remaining space is less than 50 GB. The cleanup starts from the earliest logs until the total space usage drops below 80% and the remaining space exceeds 50 GB. Valid values:

  • 1: Yes.

  • 0: No.

1

IsEnabled

integer

No

Specifies whether to enable backup. The value is fixed to 1, which indicates that backup is enabled.

1

LocalLogRetention

integer

No

The number of hours that log backups are retained locally. Valid values: 0 to 168 (7 × 24 hours). A value of 0 indicates that log backups are not retained locally. Default value: 7.

7

RemoveLogRetention

integer

No

The number of days that log backups are retained remotely. Valid values: 7 to 730. Unit: days. Default value: 7.

7

LogLocalRetentionSpace

integer

No

The maximum binary log space usage in percentage. Valid values: 0 to 50. This parameter specifies a loop space. Default value: 30.

30

ColdDataBackupInterval

integer

No

The interval of cold data backups. Unit: days. Valid values: 1 to 59.

30

ColdDataBackupRetention

integer

No

The retention period of cold data backups. Unit: days. Valid values: 30 to 730.

30

LocalLogRetentionNumber

integer

No

The number of local binary logs to retain. Default value: 60. Valid values: 6 to 100.

60

IsCrossRegionDataBackupEnabled

boolean

No

Specifies whether to enable cross-region data backup. Default value: false.

false

IsCrossRegionLogBackupEnabled

boolean

No

Specifies whether to enable cross-region log backup. Default value: false.

false

DestCrossRegion

string

No

The destination region for cross-region backup.

cn-shanghai

CrossRegionDataBackupRetention

integer

No

The retention period of cross-region data backups. Unit: days.

30

CrossRegionLogBackupRetention

integer

No

The retention period of cross-region log backups. Unit: days.

30

CrossRegionFilterValue

string

No

Response elements

Element

Type

Description

Example

object

Message

string

The response message. "success" is returned if the request is successful. Otherwise, the corresponding error code is returned.

success

RequestId

string

The request ID.

FEA5DC20-6D8A-5979-97AA-FC57546ADC20

Success

boolean

Indicates whether the request is successful.

true

Data

object

The backup policy details.

LogLocalRetentionSpace

integer

DBInstanceName

string

BackupWay

string

BackupPeriod

string

ForceCleanOnHighSpaceUsage

integer

BackupType

string

LocalLogRetention

integer

RemoveLogRetention

integer

BackupPlanBegin

string

BackupSetRetention

integer

IsEnabled

integer

ColdDataBackupInterval

integer

ColdDataBackupRetention

integer

LocalLogRetentionNumber

integer

IsCrossRegionDataBackupEnabled

boolean

IsCrossRegionLogBackupEnabled

boolean

DestCrossRegion

string

CrossRegionDataBackupRetention

integer

CrossRegionLogBackupRetention

integer

CrossRegionFilterValue

string

Examples

Success response

JSON format

{
  "Message": "success",
  "RequestId": "FEA5DC20-6D8A-5979-97AA-FC57546ADC20",
  "Success": true,
  "Data": {
    "LogLocalRetentionSpace": 0,
    "DBInstanceName": "",
    "BackupWay": "",
    "BackupPeriod": "",
    "ForceCleanOnHighSpaceUsage": 0,
    "BackupType": "",
    "LocalLogRetention": 0,
    "RemoveLogRetention": 0,
    "BackupPlanBegin": "",
    "BackupSetRetention": 0,
    "IsEnabled": 0,
    "ColdDataBackupInterval": 0,
    "ColdDataBackupRetention": 0,
    "LocalLogRetentionNumber": 0,
    "IsCrossRegionDataBackupEnabled": false,
    "IsCrossRegionLogBackupEnabled": false,
    "DestCrossRegion": "",
    "CrossRegionDataBackupRetention": 0,
    "CrossRegionLogBackupRetention": 0,
    "CrossRegionFilterValue": ""
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.