All Products
Search
Document Center

PolarDB:Configure backup policy settings

Last Updated:Nov 21, 2025

Data backup and log backup are enabled by default for PolarDB clusters and cannot be disabled. You can adjust the backup policy of a cluster based on your business needs while ensuring data reliability. For example:

  • Change the level-1 backup method from Standard Backup to High-frequency Backup. This shortens the backup cycle, increases backup density, and improves data restoration speed.

  • Enable Cross-region Backup for level-2 backups. This minimizes data loss caused by natural disasters or hardware failures. This method provides high availability for data restoration and meets requirements for data reliability, security, geo-redundant recovery, disaster recovery, long-term data archiving, and regulatory compliance.

    Note

    Only PolarDB for MySQL Enterprise Edition supports cross-region backup.

Procedure

  1. Log on to the PolarDB console. Select the region where the cluster is located. On the Clusters page, click the ID of the target cluster. In the navigation pane on the left, choose Settings and Management > Backup and Restoration.

  2. On the Backup Policy Settings page, click Modify to set the parameters. The configurable backup policy parameters vary based on the storage class, as described in the following sections:

    Note

    For more information about the backup policy parameters, see Data backup policy, Log backup policy, and General backup policy.

    PSL4/PSL5

    Data backups are categorized as level-1 or level-2 backups depending on their storage location. You can set the Level-1 Backup, Level-2 Backup, Log Backup, and General parameters. image

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

    Data backups can be saved only locally. They are also called level-1 backups. Set the Level-1 Backup, Log Backup, and General parameters. image

Backup policy parameters

Data backup policy

Data backups are available in two storage classes:

PSL4/PSL5

Level-1 backup

Parameter

Description

Backup Method

The frequency of automatic backups. You can select Standard Backup or High-frequency Backup.

  • Standard Backup (at specified intervals):

    • Default setting: An automatic backup is performed once a day.

    • Custom options:

      • Backup Cycle: You can specify the days of the week to perform backups.

      • Start Time: You can specify the time of day to perform backups.

    • Security limit: To ensure data security, set the standard backup frequency to at least twice a week.

  • High-frequency Backup:

    • Features:

      • Provides enhanced protection. It shortens the backup cycle, increases backup density, and improves data restoration speed.

      • You can choose to perform an enhanced backup every 2, 3, or 4 hours within the last 24 hours.

    • Backup retention rules:

      • Last 24 hours: All backup files completed within this period are retained.

      • Older than 24 hours: The system retains only the first backup file completed after 00:00 each day. Other backups are automatically deleted.

Backup Cycle

Set the cycle for automatic data backups.

Note

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

Backup Start Time

Set the start time for automatic data backups.

Note

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

Backup Frequency

Set the frequency for automatic data backups. The following options are available:

  • Every 2 hours in the last 24 hours.

  • Every 3 hours in the last 24 hours.

  • Every 4 hours in the last 24 hours.

Note

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

Backup Retention Period

Set the backup retention period.

Note
  • Data backup is enabled by default, and the default retention period is 7 days.

  • Adjustable range: You can set the retention period to a value from 3 to 14 days.

Level-2 backup

Parameter

Description

Backup Switch

Enable or disable level-2 backup.

Note
  • Level-2 backup is disabled by default. Enabling level-2 backup incurs additional fees. You cannot manually delete level-2 backups. You can adjust the retention period of level-2 backups to automatically delete them.

  • Low-frequency level-2 backup: The backup cycle for level-2 backups is set to a lower frequency than that for level-1 backups. For example, if the level-1 backup cycle is five days a week and the level-2 backup cycle is three days a week, this is a low-frequency level-2 backup.

  • Low-frequency dump rule: After you enable low-frequency level-2 backup, if you select a specific day for the backup cycle, the earliest backup set of that day is dumped.

  • After you enable low-frequency level-2 backup, subsequent backup sets can be dumped only if they meet the low-frequency dump rule.

Backup Method

You can select Same-region Backup or Cross-region Backup.

Note
  • After you enable level-2 backup, same-region backup is enabled by default.

  • If you enable both same-region backup and cross-region backup, two copies of backup data are dumped.

  • If you cannot select cross-region backup, see Regions that support cross-region backup.

Backup Cycle

Set the backup cycle for level-2 backups.

Note

You can select only the dates that correspond to level-1 backups.

Same-region Backup Retention

Set the retention period for same-region backups.

Note
  • The minimum retention period is 30 days and the maximum retention period is 7300 days.

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

Cross-region Backup Region

Select the region where you want to store cross-region backups.

Cross-region Backup Retention

Set the retention period for cross-region backups.

Note
  • The minimum retention period is 30 days and the maximum retention period is 7300 days.

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

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

Level-1 backup

Parameter

Description

Backup Method

The frequency of automatic backups. You can select Standard Backup or High-frequency Backup.

  • Standard Backup (at specified intervals):

    • Default setting: An automatic backup is performed once a day from Monday to Friday.

    • Custom options:

      • Backup Cycle: You can specify the days of the week to perform backups.

      • Start Time: You can specify the time of day to perform backups.

    • Security limit: To ensure data security, set the standard backup frequency to at least twice a week.

  • High-frequency Backup:

    • Features:

      • Provides enhanced protection. It shortens the backup cycle, increases backup density, and improves data restoration speed.

      • You can choose to perform an enhanced backup every 2, 3, or 4 hours within the last 24 hours.

    • Backup retention rules:

      • Last 24 hours: All backup files completed within this period are retained.

      • Older than 24 hours: The system retains only the first backup file completed after 00:00 each day. Other backups are automatically deleted.

Backup Cycle

Set the cycle for automatic data backups.

Note

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

Backup Start Time

Set the start time for automatic data backups.

Note

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

Backup Frequency

Set the frequency for automatic data backups. The following options are available:

  • Every 2 hours in the last 24 hours.

  • Every 3 hours in the last 24 hours.

  • Every 4 hours in the last 24 hours.

Note

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

Backup Retention Period

Set the backup retention period.

Note
  • Data backup is enabled by default, and the default retention period is 7 days.

  • The minimum retention period is 3 days and the maximum retention period is 14 days.

High-frequency backup example

For example, if you set up a High-frequency Backup (Create A Backup 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 on March 1) and continues to create a backup every 4 hours.

Note

After you enable the High-frequency Backup feature, all backups completed within the last 24 hours are retained. For backups older than 24 hours, the system retains only the first backup completed after 00:00 each day. Other backups are deleted.

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

    • Backups completed within the last 24 hours (from 16:00 on March 3 to 16:00 on March 4).

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

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

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

    image

  2. Four hours later, at 20:00 on March 4, the system retains the following backups:

    • Backups completed within the last 24 hours (from 20:00 on March 3 to 20:00 on March 4).

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

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

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

    image

Log backup policy

Log backups are created by saving every database redo log file offline. Log backup policies vary based on the storage class.

PSL4/PSL5

Parameter

Description

Backup Method

You can select Same-region Backup or Cross-region Backup.

Note
  • Same-region log backup is enabled by default and cannot be disabled.

  • You can select cross-region backup for log backups only if cross-region backup is enabled for level-2 backups.

Same-region Backup Retention

Set the retention period for same-region log backups.

Note
  • The minimum retention period is 3 days and the maximum retention period is 7300 days.

  • Same-region log backups cannot be deleted within their retention period.

  • If you want to retain log backups for a long term, select Long-term Retain Backups before Cluster Deletion. After you select this option, you cannot set a retention period in days.

  • Currently, only Enterprise Edition clusters support the Long-term Retain Backups before Cluster Deletionn option.

Cross-region Backup Region

This is the same as the cross-region backup region for level-2 backups. You do not need to select a region.

Cross-region Backup Retention

Set the retention period for cross-region log backups.

Note
  • The minimum retention period is 3 days and the maximum retention period is 7300 days.

  • Cross-region log backups cannot be deleted within their retention period.

  • If you want to retain log backups for a long term, select Long-term Retain Backups before Cluster Deletion. After you select this option, you cannot set a retention period in days.

  • Currently, only Enterprise Edition clusters support the Long-term Retain Backups before Cluster Deletion option.

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

Parameter

Description

Log Backup Retention

Set the retention period for log backups.

Note
  • The minimum retention period is 3 days and the maximum retention period is 7300 days.

  • Log backups cannot be deleted within their retention period.

  • If you want to retain log backups for a long term, select Long-term Retain Backups before Cluster Deletion. After you select this option, you cannot set a retention period in days.

  • Currently, only Enterprise Edition clusters support the Long-term Retain Backups before Cluster Deletion option.

General backup policy

The general backup policy defines the retention policy for backup files when a cluster is released.

Parameter

Description

When Cluster Is Deleted

Set the backup retention policy for when a cluster is deleted.

  • Retain all backups: Retains all backups of the cluster when it is released.

  • Retain only the final backup: Performs a full backup before the cluster is released and retains only this backup.

  • Delete all backups: Immediately deletes all backups and logs after the cluster is released. This action cannot be undone.

Note
  • If you select Retain all backups or Retain only the final backup, the system performs a full backup of the PolarDB cluster before it is released to save all data.

  • If cross-region backup is configured and you select the Delete all backups policy, all cross-region backup sets and logs are deleted when the cluster is released. This action cannot be undone. If you select another policy, the configured expiration policy is executed.

  • After a cluster is released, level-1 backups are automatically converted to level-2 backups. You can view all saved backups in the cluster recycle bin.

  • After a cluster is released, the free quota is no longer available. You may be charged a small fee for retained backups. You can delete the backups of the released cluster at any time to save costs.

Related API operations

API

Description

DescribeBackupPolicy

Queries the data backup retention policy of a PolarDB cluster.

ModifyBackupPolicy

Modifies the data backup retention policy of a PolarDB cluster.

DescribeLogBackupPolicy

Queries the log backup retention policy of a PolarDB cluster.

ModifyLogBackupPolicy

Modifies the log backup retention policy of a PolarDB cluster.