All Products
Search
Document Center

PolarDB:Configure backup settings

更新時間:Aug 27, 2024

PolarDB supports data backup and redo log backup. Backing up data is a process of creating a backup set (snapshot) of all data on a cluster at a certain point in time. Backing up redo logs is a process of recording the new data after a backup set is created. You can configure policies for data backup and redo log backup. For example, you can specify the backup method, the retention periods of data backup files and log backup files, and the storage location.

Parameters in the Data Backup section

  • If your cluster is of Enterprise Edition and uses the PSL4 or PSL5 storage type, data backup are categorized into level-1 backup and level-2 backup based on the storage location. Data backup policies are categorized into level-1 backup policy and level-2 backup policy.

    Backup method

    Parameter

    Description

    Level-1 Backup

    Backup Method

    The backup method that determines the frequency of automatic data backups. You can select Standard Backup (at specified intervals) or High-frequency Backup.

    • Standard Backup (at specified intervals): performs automatic backup once on each of the specified days of the week. You can set the backup cycle and start time for automatic data backup.

      Note
      • To prevent data loss, automatic backup must be performed at least twice a week.

      • Automatic backup files cannot be deleted.

      • High-frequency Backup: performs multiple automatic backups within 24 hours. This backup method increases backup frequency to speed up data restoration in PolarDB.

        You can configure the system to perform a backup once every two, three, or four hours. The first backup is created two hours after you configure the backup policy regardless of the backup frequency you specify.

        The system retains all backups files that are created by this backup method within the last 24 hours. For backup files that are created earlier than the previous 24 hours, the system permanently retains only the first backup that is created after 00:00 every day and deletes the rest.

        For example, if you specify a backup frequency of 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. Then, the system continues to create a backup every 4 hours.

        If the current time is 16:00 on March 4, the following backups are retained:

        • The backups created within the last 24 hours (from 16:00 on March 3 to 16:00 on March 4).

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

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

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

        1

        Then, 4 hours later (at 20:00) on March 4, the following backups are retained:

        • The backups created within the last 24 hours (from 20:00 on March 3 to 20:00 on March 4).

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

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

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

        2

    Backup Cycle

    The days of the week on which automatic data backups are performed.

    Note

    This parameter is required only when Standard Backup is selected.

    Backup Start Time

    The time range within which automatic data backups are performed.

    Note

    This parameter is required only when Standard Backup is selected.

    Backup Frequency

    The interval at which automatic backups are performed. Valid values: Last 24 Hours, Every 2 Hours, Last 24 Hours, Every 3 Hours, or Last 24 Hours, Every 4 Hours.

    Note

    This parameter is required only when High-frequency Backup is selected.

    Backup Retention Period

    The retention period of level-1 backups.

    Note
    • By default, level-1 backup is enabled. The default retention period of level-1 backups is 7 days.

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

    Level-2 Backup

    Switch for Level-2 Backup

    Specifies whether to enable the level-2 backup feature.

    Note
    • By default, the level-2 backup feature is disabled. If you enable the feature, you are charged additional fees. You can delete backup files to reduce costs. For more information about the pricing of level-2 backup, see Billing rules of backup storage that exceeds the free quota.

      • Backup dumping rule: When level-2 backup is enabled, the system dumps the first backup created on the days selected for the Backup Cycle parameter.

      • When level-2 backup is enabled, backups are dumped only when the conditions in the backup dumping rule are met.

    Backup Method

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

    Note
    • By default, Same-region Backup is selected.

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

    Backup Cycle

    The days on which level-2 backups are performed.

    Note

    You can only select the days specified in the Backup Cycle parameter for level-1 backups.

    Same-region Backup and Retention

    The retention period of same-region backups.

    Note
    • Level-2 backups can be retained for 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. After you select this option, you cannot specify the retention period of 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
    • Level-2 backups can be retained for 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. After you select this option, you cannot specify the retention period of level-2 backups.

Parameters in the Log Backup section

When you configure a redo log backup policy, you must specify the retention period of redo logs.

Parameter

Description

Backup Method

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

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

  • Cross-region log backup can be enabled only when cross-region level-2 backup is enabled.

Same-region Backup and Retention

The retention period of same-region log backups.

Note
  • Log backup files can be retained for 3 to 7,300 days.

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

Destination Backup Region

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

Cross-region Backup and Retention

The retention period of cross-region backups.

Note
  • Log backup files can be retained for 3 to 7,300 days.

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

Parameters in the General section

You can configure a backup retention policy that applies when you delete a cluster.

Parameter

Description

When Cluster Is Deleted

The backup retention policy that applies when you delete a cluster.

  • When the cluster is deleted, 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 delete a cluster.

  • When the cluster is deleted, the cluster data is automatically backed up, and the backup set is retained for a long period of time: retains the most recent backup when you delete a cluster.

  • When the cluster is released, all backup sets of the cluster are deleted immediately: does not retain backups when you delete a cluster.

Note
  • If you select When the cluster is deleted, 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 deleted, the cluster data is automatically backed up, and the backup set is retained for a long period of time policy, the system runs an automatic backup task to retain all data when you delete the PolarDB cluster.

  • 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. For more information, see Restore a released cluster.

  • If cross-region backup is enabled and All backups are deleted immediately. is selected, the backup sets that reside in other regions are also deleted when you delete the cluster. If you select other policies, the configured retention policies apply.

Procedure

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region in which the cluster is deployed.

  3. In the left-side navigation pane, click Clusters.

  4. Find the cluster and click its ID.

  5. In the left-side navigation pane, choose Settings and Management > Backup and Restoration.
  6. On the Backup Policy Settings tab, click Modify.Modify

  7. In the Backup Policy Settings dialog box, configure the parameters in each section.

    1. If your cluster is of Enterprise Edition and uses the PSL4 or PSL5 storage type, data backup are categorized into level-1 backup and level-2 backup based on the storage location. You must configure the parameters in the level-1 Backup, level-2 Backup, Log Backup, and General sections.

      eddb7e03fe6987bb6fde1c2ba15807a1

  8. In the message that appears, click OK.

Related API operations

Operation

Description

DescribeBackupPolicy

Queries the backup policy of a specified PolarDB cluster.

ModifyBackupPolicy

Modifies the backup policy of a specified PolarDB cluster.