Binary log files can be used to build a primary/secondary architecture and track data. This topic describes how to view and delete the binary log files of an ApsaraDB RDS for MySQL instance.

Differences between binary log files and log backup files

Item Binary log file Log backup file
Overview Binary log files can be used to build a primary/secondary architecture or track data. 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. For more information, see Use the log backup feature.
Enabling and disabling The feature is automatically enabled and cannot be disabled. You can enable or disable the feature based on your business requirements.
Billing rule N/A

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.

Storage capacity Binary log files consume the storage capacity of your RDS instance. Log backup files do not consume the storage capacity of your RDS instance.
Note Log backup files are stored in backup storage that is inaccessible.

Rules for generating binary log files

Binary log files are generated on RDS instances in real time. The rules based on which binary log files are generated vary based on the edition of your RDS instance.
  • RDS Basic Edition or RDS High-availability Edition: When the size of a binary log file reaches 512 MB or the time period during which binary log data is being written to a binary log file exceeds 6 hours, a new binary log file is generated.
  • RDS Enterprise Edition: When the size of a binary log file reaches 512 MB, a new binary log file is generated.

View binary log files

You cannot view binary log files in the ApsaraDB RDS console. To view binary log files, you must execute the SHOW BINARY LOGS; statement. For more information, see ApsaraDB RDS for MySQL remotely obtains and parses binary log files.

View the total size of binary log 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 Monitoring and Alerts. On the Standard Monitoring tab of the page that appears, view the total size of binary log files.
    Note By default, the total size of binary log files on the primary RDS instance is the same as the size of binary log files on a secondary RDS instance. The sizes may differ due to the following reasons: The primary RDS instance replicates data to the secondary RDS instance at a specific latency, the binary log files are dumped at a specific latency, Data Transmission Service (DTS) is migrating data from the primary RDS instance or to the primary RDS instance, or the secondary RDS instance is reading and applying binary log records.
    Log usage

Delete binary log files

For more information, see Delete the binary log files of an ApsaraDB RDS for MySQL instance.