All Products
Search
Document Center

PolarDB:Configure backup policy settings

Last Updated:Apr 15, 2025

By default, the data backup and log backup features are enabled for PolarDB clusters and cannot be disabled. You can adjust the backup policy settings of a PolarDB cluster while ensuring data reliability. Examples:

  • You can change the level-1 backup method from Standard Backup to High-frequency Backup to shorten the backup cycle, increase the backup frequency, and accelerate data restoration.

  • You can enable the Cross-region Backup method for level-2 backup to minimize data loss risks caused by natural disasters or hardware failures. This ensures high data availability and meets the requirements for data reliability and security, geo-redundancy recovery, geo-disaster recovery, long-term data archiving, and regulatory compliance.

Procedure

  1. Log on to the PolarDB console. In the left-side navigation pane, click Clusters. In the upper-left corner of the page that appears, select the region of the cluster and click its ID to go to the Basic Information page. In the left-side navigation pane, choose Settings and Management > Backup and Restoration.

  2. On the Backup Policy Settings tab, click Modify to configure the parameters. The backup policy parameters vary based on the storage type.

    Note

    To configure the parameters, see the "Data backup policy", "Log backup policy", and "General retention policy" sections of this topic.

    PSL4/PSL5

    Data backups are categorized into level-1 backups and level-2 backups based on the storage location. Configure the Level-1 Backup, Level-2 Backup, Log Backup, and General parameters. image

    ESSDs (PL0, PL1, PL2, PL3, and AutoPL)

    Data backup files can be stored only on the distributed storage system of the cluster. Data backup files are also called level-1 backups. Configure the Level-1 Backup, Log Backup, and General parameters. image

Backup policy parameters

Data backup policy

Data backup varies based on the storage type.

PSL4/PSL5

Level-1 backup

Parameter

Description

Backup Method

Determines the frequency of automatic data backups. Valid values: Standard Backup (at specified intervals) and High-frequency Backup.

  • Standard Backup (at specified intervals):

    • By default, automatic backup is performed once every day.

    • Custom settings:

      • Backup Cycle: You can set the specific days of the week for backups.

      • Backup Start Time Range: You can specify the exact time for backup.

    • To ensure data security, you must perform a standard backup at least twice a week.

  • High-frequency Backup

    • Features:

      • Shortens backup cycles, increases backup frequency, and improves data recovery speed for enhanced protection.

      • You can configure the system to perform enhanced backups every 2 hours, 3 hours, or 4 hours and retain backups for 24 hours.

    • Backup retention rules:

      • All backup files created in the most recent 24 hours are retained.

      • For backups older than 24 hours, only the first backup after midnight is retained.

Backup Cycle

The days of the week when automatic backups are performed.

Note

This parameter is required only if you select the Standard Backup (at specified intervals) backup method.

Backup Start Time Range

The start time range of automatic data backups.

Note

This parameter is required only if you select the Standard Backup (at specified intervals) backup method.

Backup Frequency

The frequency of automatic data backups. Valid values:

  • Last 24 Hours, Every 2 Hours

  • Last 24 Hours, Every 3 Hours

  • Last 24 Hours, Every 4 Hours

Note

This parameter is required only if you select the High-frequency Backup backup method.

Backup Retention Period

The retention period of backups.

Note
  • By default, data backup is enabled and data backups are retained for 7 days.

  • Valid range: 3 to 14 days.

Level-2 backup

Parameter

Description

Level-2 Backup

Specifies whether to enable the level-2 backup feature.

Note
  • By default, the level-2 backup feature is disabled. You are charged additional fees when you use the level-2 backup feature. You can delete backup files to reduce costs.

  • In low-frequency level-2 backups, the level-2 backup frequency is set to a value lower than the level-1 backup frequency. For example, the level-1 backup frequency is five days a week, whereas the level-2 backup frequency is three days a week.

  • The low-frequency dumping rule applies to lower-frequency level-2 backup. When a day is selected for level-2 backup, the system selects the earliest backup set created on that day for dumping.

  • After lower-frequency level-2 backup is enabled, only backup sets that meet the low-frequency dumping rule can be dumped.

Backup Method

Valid values: Same-region Backup and Cross-region Backup.

Note
  • By default, same-region backup is enabled when you enable the level-2 backup feature.

  • If you select Same-region Backup and Cross-region Backup at the same time, two copies of backup data are dumped.

  • If you cannot select Cross-region Backup, check whether the region supports cross-region backup.

Backup Cycle

The days of the week when level-2 backups are performed.

Note

You can select only the days of the week when level-1 backup is performed.

Same-region Backup and Retention

The retention period of same-region backups.

Note
  • You can specify a retention period from 30 to 7,300 days.

  • If you want to retain level-2 backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. If you select this option, you cannot specify a retention period for level-2 backups.

Destination Backup Region

The region in which the backup data is to be stored.

Cross-region Backup and Retention

The retention period of cross-region backups.

Note
  • You can specify a retention period from 30 to 7,300 days.

  • If you want to retain level-2 backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. If you select this option, you cannot specify a retention period for level-2 backups.

ESSDs (PL0, PL1, PL2, PL3, and AutoPL)

Level-1 backup

Parameter

Description

Backup Method

Determines the frequency of automatic data backups. Valid values: Standard Backup (at specified intervals) or High-frequency Backup.

  • Standard Backup (at specified intervals):

    • By default, automatic backup is performed once a day from Monday to Friday.

    • Custom settings:

      • Backup Cycle: You can set the specific days of the week for backups.

      • Backup Start Time Range: You can specify the exact time for backup.

    • To ensure data security, you must perform standard backup at least twice a week.

  • High-frequency Backup

    • Features:

      • Shortens backup cycles, increases backup frequency, and improves data recovery speed for enhanced protection.

      • You can configure the system to perform enhanced backups every 2 hours, 3 hours, or 4 hours and retain backups for 24 hours.

    • Backup retention rules:

      • All backup files created in the most recent 24 hours are retained.

      • For backups older than 24 hours, only the first backup after midnight is retained.

Backup Cycle

The days of the week when automatic backups are performed.

Note

This parameter is required only if you select Standard Backup (at specified intervals).

Backup Start Time Range

The start time range of automatic data backups.

Note

This parameter is required only if you select Standard Backup (at specified intervals).

Backup Frequency

The frequency of automatic backups. Valid values:

  • Last 24 Hours, Every 2 Hours

  • Last 24 Hours, Every 3 Hours

  • Last 24 Hours, Every 4 Hours

Note

This parameter is required only if you select High-frequency Backup.

Backup Retention Period

The retention period of backups.

Note
  • By default, data backup is enabled and data backups are retained for 7 days.

  • The valid values of the retention period are 3 to 14 days.

High-frequency backup examples

For example, when a high-frequency backup is configured (the backup frequency is set to Every 4 Hours) at 08:00 on March 1, the system automatically creates the first backup within 4 hours from 08:00 to 12:00. Then, the system continues to create a backup every 4 hours.

Note

If you select High-frequency Backup, all backups are retained for 24 hours. For backups older than 24 hours, only the first backup after midnight is retained.

  1. If the current time is 16:00 on March 4, the system retains the following backups:

    • The backups created during the most recent 24 hours (from 16:00 on March 3 to 16:00 on March 4).

    • The backup created between 00:00 and 04:00 on March 3.

    • The backup created between 00:00 and 04:00 on March 2.

    • The backup created between 08:00 and 12:00 on March 1.

    image

  2. At 20:00 on March 4 (after 4 hours), the system retains the following backups:

    • Backups created in the most recent 24 hours (from 20:00 on March 3 to 20:00 on March 4).

    • The backup created between 00:00 and 04:00 on March 3.

    • The backup created between 00:00 and 04:00 on March 2.

    • The backup created between 08:00 and 12:00 on March 1.

    image

Log backup policy

Each redo log file of the database is stored in on-premises storage. Log backup varies based on the storage type.

PSL4/PSL5

Parameter

Description

Backup Method

Valid values: Same-region Backup and Cross-region Backup.

Note
  • By default, same-region log backup is enabled and cannot be disabled.

  • You can enable cross-region log backup only if you enable cross-region level-2 backup.

Same-region Backup and Retention

The retention period of same-region log backups.

Note
  • You can specify a retention period for same-region log backups from 3 to 7,300 days.

  • You cannot delete same-region log backups within the retention period.

  • If you want to retain log backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. If you select this option, you cannot specify a retention period for log backups.

  • The Long-term Retain Backups before Cluster Deletion option is available only for Enterprise Edition clusters.

Destination Backup Region

The value of this parameter is the same as that of the Destination Backup Region parameter for level-2 backup. You do not need to configure this parameter.

Cross-region Backup and Retention

The retention period of cross-region log backups.

Note
  • You can specify a retention period for cross-region log backups from 3 to 7,300 days.

  • You cannot delete cross-region log backups within the retention period.

  • If you want to retain log backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. If you select this option, you cannot specify a retention period for log backups.

  • The Long-term Retain Backups before Cluster Deletion option is available only for Enterprise Edition clusters.

ESSDs (PL0, PL1, PL2, PL3, and AutoPL)

Parameter

Description

Log Retention Period (Days)

The retention period for log backups.

Note
  • You can specify a retention period from 3 to 7,300 days.

  • You cannot delete log backups within the retention period.

  • If you want to retain log backups for a long period of time, select Long-term Retain Backups before Cluster Deletion. If you select this option, you cannot specify a retention period for log backups.

  • The Long-term Retain Backups before Cluster Deletion option is available only for Enterprise Edition clusters.

General retention policy

The general retention policy of a cluster defines how backup files are retained when the cluster is released.

Parameter

Description

When Cluster Is Deleted

The backup retention policy that applies when a cluster is deleted.

  • When the cluster is released, the cluster data is automatically backed up, and all backup sets of the cluster are retained for a long period of time.: retains all backups when you release a cluster.

  • When the cluster is released, the cluster data is automatically backed up, and the latest backup set is retained for a long period of time.: performs a full backup before you release a cluster and retains the latest backup set.

  • When the cluster is released, all backup sets of the cluster are deleted immediately.: permanently deletes all backups and logs after you release a cluster.

Note
  • If you select When the cluster is released, the cluster data is automatically backed up, and all backup sets of the cluster are retained for a long period of time, or When the cluster is released, the cluster data is automatically backed up, and the latest backup set is retained for a long period of time, the system automatically backs up all data of the PolarDB cluster before the cluster is released.

  • If you select the cross-region backup method and then select the When the cluster is released, all backup sets of the cluster are deleted immediately retention policy, all cross-region backup sets and logs are permanently deleted when you release the cluster. If you select other policies, the configured retention policies apply.

  • After you delete a cluster, level-1 backups automatically become level-2 backups. You can go to the Cluster Recycle Bin page to view all backups.

  • After you release a cluster, no free storage quota is available for cluster backups. You may be charged a small fee for the retained backups. You can delete the backups of the released cluster to reduce costs.

Related API operations

API

Description

DescribeBackupPolicy

Queries the data backup policy of a PolarDB cluster.

ModifyBackupPolicy

Modifies the data backup policy of a PolarDB cluster.

DescribeLogBackupPolicy

Queries the log backup policy of a PolarDB cluster.

ModifyLogBackupPolicy

Modifies the log backup policy of a PolarDB cluster.