All Products
Search
Document Center

PolarDB:Local log backup

Last Updated:Apr 12, 2024

This topic describes how to perform local log backup.

Procedure

  1. Log on to the PolarDB for Xscale console.

  2. In the top navigation bar, select the region where the target instance is located.

  3. On the Instances page, click the PolarDB-X 2.0 tab.

  4. Find the target instance and click its ID.

  5. In the left-side navigation pane, choose Data Recovery > Backup and Restoration.

  6. Click Backup policy.

  7. On the Local Log Settings tab, configure the parameters described in the following table.

    Parameter

    Description

    Number of On-premises Log

    The maximum number of local logs to be retained. Default value: 60. If the number of local logs exceeds this threshold, local logs are deleted. Valid values: 6 to 100.

    Retention duration

    The retention period for log backup files in the PolarDB-X instance. Default value: 7. Unit: hours. The default value specifies that only the log backup files created within the most recent 7 hours are retained in local storage after log backup is enabled. The log backup files that are created before the most recent 7 hours are deleted. Valid values: 0 to 168.

    Space usage does not exceed

    The maximum storage that can be used by the backup files of binary logs. Calculation formula: Local storage usage = Size of local binary log backups/Total storage of your PolarDB-X instance. By default, this parameter is set to 30. This value specifies that if the local backup files of binary logs consume more than 30% of the total storage, the system deletes the earliest backup files of binary logs. Valid values: 0 to 50.

    Free space protection

    Specifies whether to forcibly delete the earliest backup files of binary logs. Log deletion is triggered if the used storage of the instance exceeds 80% of the total storage or the available storage is less than 5 GB. By default, this feature is enabled. When the overall storage usage is less than 80% and the available storage exceeds 5 GB, the system stops deleting the backup files of binary logs.

  8. Then, click OK.