This topic describes how to view and manage the size of backup files for an ApsaraDB RDS for MySQL instance.

View the size of backup files

Total size of backup files = Size of data backup files + Size of log backup files

You can log on to the ApsaraDB RDS console and go to the Basic Information page of your RDS instance. In the lower-right corner of the page, you can view the size of backup files for your RDS instance.

In the following figure, the size of backup files includes 33.2 GB of data backup files and 20.19 MB of log backup files.

Note
  • In the following figure, Archive backup indicates the size of the backup files that are retained for more than 730 days, and Data indicates the size of the data backup files that are not archived.
  • After you update the minor engine version of your RDS instance that runs RDS Basic Edition, 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.
Total size of backup files

Description

  • Relationship between the size of backup files and the storage capacity
    • Data and log backup files consume the backup storage that is provided by Alibaba Cloud. These files do not consume the storage capacity of your RDS instance.
    • Log files are categorized as binary log files and log backup files.
      Log file type Description Billing Purpose
      Binary log files Binary log files refer to the raw log files that are generated on your RDS instance. Binary log files are stored on your RDS instance. Binary log files do not incur charges. However, binary log files consume the storage capacity of your RDS instance. Binary log files can be used to build the primary/secondary architecture.
      Log backup files After you enable the log backup feature, ApsaraDB RDS uploads the binary log files of your RDS instance to the specified backup storage. For more information, see Backup storage pricing of an ApsaraDB RDS for MySQL instance. Log backup files are used to restore the data of your RDS instance to a specific point in time.
      Note
      • You can upload the binary log files of your RDS instance to an Object Storage Service (OSS) bucket. This reduces the storage space that is consumed by binary log files on your RDS instance. However, this does not reduce the size of log backup files. For more information, see Upload the binary log files of an ApsaraDB RDS for MySQL instance to an OSS bucket.
      • You can log on to the ApsaraDB RDS console and go to the Monitoring and Alerts page of your RDS instance. On this page, you can view the storage that is consumed by binary log files on your RDS instance. View the size of binary log files
  • Relationship between the size of backup files and the amount of data

    The size of backup files may not equal the amount of data on your RDS instance.

    If your RDS instance uses standard SSDs or enhanced SSDs (ESSDs), ApsaraDB RDS takes snapshots to back up your RDS instance. The size of a snapshot backup file may be significantly larger than the amount of data. Therefore, the free backup quota for an RDS instance that uses standard SSDs or ESSDs is four times the free backup quota for an RDS instance that uses local SSDs. For more information, see Backup storage pricing for an ApsaraDB RDS for MySQL instance.
    Note When ApsaraDB RDS calculates the size of a snapshot backup file, it counts in all the non-empty blocks to which data is written. If the write operations are scattered among blocks, none of the blocks is empty. For example, if 3 MB of data is written across two, three, or four blocks, none of these blocks is empty. In this case, ApsaraDB RDS counts in all these blocks to calculate the total size. As a result, the size of the snapshot backup file is larger than the actual amount of data.
  • Relationship between the size of backup files and the instance architecture

    The size of backup files does not vary based on the instance architecture. For example, an RDS instance that runs RDS High-availability Edition has the same amount of data as an RDS instance that runs RDS Basic Edition. In this case, these RDS instances have the same size of backup files. The size of backup files does not increase even if you use an RDS edition that provides high availability.

Delete data backup files or reduce the data backup frequency

  • Manually delete a backup file

    Prerequisites

    Before you delete a manual backup file, you must make sure that a backup is created for your RDS instance. For more information, see Manually back up an ApsaraDB RDS for MySQL instance.

    Procedure

    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 that appears, choose Base Backups > Data Backup.
    4. Find the backup file that you want to delete and choose 1 > Delete from the Actions column. 2
      Note
      • If the backup file that you want to delete is an automatic backup file and Delete is dimmed, the backup file cannot be deleted.
        • If the log backup feature is disabled, you can delete only the data backup files that are retained for more than seven days.
        • If the log backup feature is enabled, you can delete only the data backup files that are retained for longer than the specified log backup retention period. For example, if you set the log backup retention period to seven days, you can delete the data backup files that are retained for more than seven days.
      • If you delete a manual backup file, the deleted backup file cannot be restored.
  • Shorten the retention period of the data backup file
    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 that appears, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit to shorten the retention period of a data backup file.

      ApsaraDB RDS deletes the data backup files that are stored for longer than the specified data backup retention period. For example, if you set the data backup retention period of your RDS instance to 30 days, ApsaraDB RDS immediately deletes the data backup files that have been retained for more than 30 days on your RDS instance.

  • Reduce the data backup frequency
    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 that appears, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit to reduce the backup frequency.
  • Delete or migrate the data that does not need to be backed up

Reduce the log backup frequency or disable the log backup feature

  • Shorten the retention period of a log backup file
    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 that appears, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit to shorten the retention period of a log backup file.
      For example, if you set the log backup retention period of your RDS instance to 30 days, ApsaraDB RDS automatically deletes the log backup files that have been retained for more than 30 days on your RDS instance.
      Note You can set the log backup retention period only when the log backup feature is enabled.
  • 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 that appears, click the Backup Strategy tab.
    4. In the Base Backup section, click Edit to disable the log backup feature.
      Note After the log backup feature is disabled, ApsaraDB RDS immediately deletes all log backup files. You cannot restore the data of your RDS instance to a specific point in time.
  • Reduce unnecessary add, delete, and update operations, especially the update operations on large fields.
    Add, delete, and update operations increase the total size of log backup files.
    Note You can use the SQL Explorer feature to view the add, delete, update, and query operations that are performed on your RDS instance. For more information, see Use the SQL Explorer feature on an ApsaraDB RDS for MySQL instance.