All Products
Search
Document Center

ApsaraDB RDS:Use the log backup feature

更新時間:Nov 24, 2023

After you enable the log backup feature for your RDS instance, the binary log files of your RDS instance are uploaded to backup storage in real time. The binary log files in the backup storage are called log backup files. You can use log backup files to restore the data of your RDS instance to a specific point in time within the backup retention period that you specified. This topic describes how to manage and view the log backup files of an ApsaraDB RDS for MySQL instance.

Billing rules

You are not charged for the feature. However, log backup files consume backup storage, and you are charged for the backup storage that is consumed. A free quota on backup storage is provided. If the total size of data backup files and log backup files exceeds the free quota, you are charged additional fees for the excess backup storage that you use. For more information, see Backup storage fees.

Enable or disable the log backup feature

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the page that appears, click the Backup Strategy tab.

  4. In the Base Backup section, click Edit to enable or disable the log backup feature.

    Note
    • After you enable the log backup feature, you can specify a retention period for log backup files. Log backup files can be retained for 7 to 730 days. The retention period for log backup files cannot be longer than the retention period for data backup files.

    • After you disable the log backup feature, the system automatically deletes existing log backup files within 1 to 3 minutes. Deleted log backup files cannot be restored. Proceed with caution.

    • If your RDS instance runs MySQL 5.7 on RDS Basic Edition, the retention period for log backup files is fixed as seven days.

View log backup files

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the left-side navigation pane of the page that appears, click Backup and Restoration.

  3. On the page that appears, click Base Backups and then Log Backup.

    If your RDS instance runs RDS High-availability Edition or RDS Enterprise Edition, log backup files are generated by your primary RDS instance and its secondary RDS instances. You can check the instance ID of each log backup file to identify the log backup files that are generated by your primary RDS instance and the log backup files that are generated by the secondary RDS instances.

View the total size of log backup files

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. On the Basic Information page of the RDS instance, view the total size of log backup files in the Usage Statistics section.

    image.png

    Note
    • Log backup files are stored in the backup storage and do not consume the storage capacity of your RDS instance. The backup storage is inaccessible.

    • After you update the minor engine version of your RDS instance, the value of the Backup Usage parameter on the Basic Information page of the RDS instance may be displayed as 0. After the next scheduled backup is complete, this error is automatically fixed.

Delete log backup files

For more information, see Delete backup files or reduce the size of backup files.

Download log backup files

For more information, see Download backup files.

Restore data to a specific point in time

For more information, see Restore full data and Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.

FAQ

Category

Description

Data restoration

Can I use log backup files to restore data?

After the log backup feature is enabled, you can restore data to a specific point in time within the backup retention period that you specified. The point in time can be accurate to seconds. For more information, see Restore full data and Restore individual databases and tables of an ApsaraDB RDS for MySQL instance.

Backup fee

Am I charged for the log backup feature?

No, you are not charged for the feature. However, log backup files consume backup storage, and you are charged for the backup storage that is consumed. A free quota on backup storage is provided. If the total size of data backup files and log backup files exceeds the free quota, you are charged additional fees for the excess backup storage that you use. For more information, see Backup storage fees.

Backup file check

  • No log backup files are displayed on the Log Backup tab of my RDS instance. Why?

    This issue occurs due to one of the following reasons:

    • The log backup feature is disabled for your RDS instance. For more information about how to enable the log backup feature, see Enable or disable the log backup feature.

    • Your RDS instance is newly created, or the log backup feature is recently enabled for your RDS instance. In this case, log backup files have not been uploaded to the backup storage, and no log backup files are displayed on the Log Backup tab.

  • The most recent log backup file is not displayed on the Log Backup tab. Why?

    Only the log backup files to which no new data is written are displayed on the Log Backup tab. Log backup files to which data is being written are not uploaded to the backup storage.

  • If I set the log backup retention period to seven days, can I obtain log backup files that are generated seven days before the current date?

    No, you cannot obtain log backup files that are generated seven days before the current date in this case. The system automatically deletes the log backup files that are stored for a longer period of time than the specified log backup retention period. We recommend that you specify a log backup retention period based on your business requirements.

Disabling of the feature and reduction of log backups

  • How do I delete log backup files after I disable the log backup feature?

    After you disable the log backup feature, the system automatically deletes existing log backup files within 1 to 3 minutes. Deleted log backup files cannot be restored. Proceed with caution.

  • Why am I still able to query log backup files by executing the SHOW BINARY LOGS; statement after I disable the log backup feature?

    The files that you query by executing this statement are binary log files rather than log backup files. For more information about how to delete binary log files, see Delete the binary log files of an ApsaraDB RDS for MySQL instance.

  • No storage is released after I disable the log backup feature. Why?

    Log backup files do not consume the storage capacity of your RDS instance. Binary log files consume the storage capacity of your RDS instance.

  • Why does the size of log backup files suddenly increase?

    If you frequently add data, modify data, or delete data on your RDS instance, the size of log backup files increases. For more information about how to delete log backup files, see Delete backup files or reduce the size of backup files.

Related operations

Operation

Description

DescribeBackupPolicy

Queries the backup settings of an instance.

ModifyBackupPolicy

Modifies the backup settings of an instance.