PolarDB supports data backup and redo log backup. When you back up data, you create a backup set of all data on a cluster at a specific point in time. A backup set is also known as a snapshot. When you back up redo logs, you record the incremental data that is generated after a backup set is created. You can configure policies for data backup and redo log backup. For example, you can specify the frequency of automatic data backups, the retention period of data backup files, the storage location, and the retention period of log backup files.

Navigate to the details page of the cluster for which you want to configure backup settings. In the left-side navigation pane, choose Settings and Management > Backup and Restore. Click the Backup Settings tab.

Click Edit. In the dialog box that appears, configure parameters in the Back up Data, Log Backup, and General sections.

Backup settings

Parameters in the Back up Data section

To configure a data backup policy, specify the frequency of automatic backups and the storage location and retention period of the backup files generated by automatic backups and manual backups.

Parameter Description
Backup Frequency The frequency of automatic backups. You can select Standard Backup or Enhanced Backup.
  • Standard Backup: If you select this option, you must specify the frequency of automatic backups and the time when automatic backups start.
    Note To prevent data loss, perform automatic backup at least two times a week.
  • Enhanced Backup: If you select this option, you must specify the backup frequency. You can select Last 24 Hours, Every 2 Hours, Last 24 Hours, Every 3 Hours, or Last 24 Hours, Every 4 Hours.
Data Backup Retention Period The storage location and retention period of the data backup files generated by automatic backups and manual backups.

You can specify Level-1 Backup or Level-2 Backup as the storage location. For more information, see Data backups.

  • Level-1 Backup: If you select this option, you must specify the retention period for level-1 backups.
    Note
    • By default, level-1 backup is enabled. The default retention period of level-1 backups is 7 days.
    • A backup can be retained for 3 to 14 days.
  • Level-2 Backup: You can enable or disable level-2 backup.
    Note
    • By default, level-2 backup is disabled. If you enable the feature, storage fees are incurred. 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.
    • Level-2 backups can be retained for 30 to 7,300 days.
    • If you want to permanently retain level-2 backups, select Retained Before Cluster Is Deleted. 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
Log Backups Retained For The retention period of log backup files.
Note
  • By default, log backup is enabled. The default retention period of a log backup file is 7 days.
  • Log backup files can be retained for 3 to 7,300 days.
  • To permanently retain log backup files, select Retained Before Cluster Is Deleted. The Retention Period parameter becomes unavailable if you select this option.

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.
  • Permanently Retain All Backups: retains all backups after you delete a cluster.
  • Permanently Retain Last Automatic Backup: retains the latest backup after you delete a cluster.
  • Immediately Delete All Backups: does not retain backups after you delete a cluster.
Note
  • If you select the Permanently Retain All Backups or Permanently Retain Last Automatic Backup 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 are automatically transferred to level-2 backups. You can go to the Cluster Recycle page to view all backups. For more information, see Restore a released cluster.

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.