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 data 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

The log backup feature is provided free of charge, and a free quota on backup storage is provided. If the total size of the data backup files and log backup files of your RDS instance exceeds the free quota, you are charged for the excess backup storage. For more information, see Backup storage pricing of an ApsaraDB RDS for MySQL instance.

Enable or disable the log backup feature

  1. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, click the Backup Strategy tab.
  4. In the Base Backup section, click Edit to disable the log backup feature.
    Note
    • After you turn on Log Backup, 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.
    • 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. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. In the left-side navigation pane, click Backup and Restoration.
  3. On the Backup and Restoration page, 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. Access RDS Instances, select a region at the top, and then click the ID of the target RDS instance.
  2. On the Basic Information page of the RDS instance, view the total size of log backup files in the Usage Statistics section.
    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 Size parameter on the Basic Information page in the ApsaraDB RDS console 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 the backup files or reduce the backup frequency of an ApsaraDB RDS for MySQL instance

Download log backup files

For more information, see Download the backup files of an ApsaraDB RDS for MySQL instance

Restore data to a specific point in time

For more information, see Restore full data of an ApsaraDB RDS for MySQL instance 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 of an ApsaraDB RDS for MySQL instance or 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 enabling the log backup feature. A free quota on backup storage is provided. For more information, see Billing.

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. ApsaraDB RDS 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?

    You do not need to delete log backup files. ApsaraDB RDS automatically deletes log backup files immediately after you disable the log backup feature.

  • 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 the backup files or reduce the backup frequency of an ApsaraDB RDS for MySQL instance.

Related operations

Operation Description
DescribeBackupPolicy Queries the backup settings of an ApsaraDB RDS instance.
ModifyBackupPolicy Modifies the backup settings of an ApsaraDB RDS instance.