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

The size of backup files for your RDS instance is the total size of the data and log backup files that are generated on your RDS instance.

View the size of backup files

You can log on to the ApsaraDB RDS console and go to the Basic Information page for 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, the Backup Size on the Basic Information page of the ApsaraDB RDS console may be displayed as 0. After the next scheduled backup is complete, this error is automatically fixed.
Backup Size in the Usage Statistics section of the Basic Information page

Additional information

  • 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 local log files and log backup files.
      Log file type Description Billing Purpose
      Local log files Local log files refer to the raw log files that are generated on your RDS instance. Local log files are stored on your RDS instance. Local log files do not incur charges. However, local log files consume the storage capacity of your RDS instance. Local 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 local log files of your RDS instance to the specified backup storage. For more information, see Backup storage pricing for 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 local log files of your RDS instance to an Object Storage Service (OSS) bucket. This reduces the storage space that is consumed by local 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 for your RDS instance. On this page, you can view the storage space that is consumed by local log files on your RDS instance. View the size of local 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 or enhanced SSDs, 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 quota for backup storage that is allocated to an RDS instance that uses standard or enhanced SSDs is four times the free quota for backup storage that is allocated to 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 the High-availability Edition has the same amount of data as an RDS instance that runs the 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

  • Delete data backup files.
    1. Visit the RDS instance list, select a region above, and click the target instance ID.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the Data Backup tab, find the data backup file that you want to delete, and click Delete in the Actions column.
      Note If you cannot find the Delete button, you can check whether the following requirements are met:
      • 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.
  • Configure a policy that allows ApsaraDB RDS to automatically delete data backup files.
    1. Visit the RDS instance list, select a region above, and click the target instance ID.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the Backup Settings tab, click Edit. In the Backup Settings dialog box, reduce the data backup retention period.

      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. Visit the RDS instance list, select a region above, and click the target instance ID.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the Backup Settings tab, click Edit. In the Backup Settings dialog box, reduce the data backup frequency.
  • Delete or migrate the data that does not need to be backed up.

Delete log backup files or reduce the log backup frequency

  • Reduce the log backup retention period.
    1. Visit the RDS instance list, select a region above, and click the target instance ID.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the Backup Settings tab, click Edit. In the Backup Settings dialog box, reduce the log backup retention period.
      For example, if you set the log backup retention period of your RDS instance to 30 days, ApsaraDB RDS immediately 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. Visit the RDS instance list, select a region above, and click the target instance ID.
    2. In the left-side navigation pane, click Backup and Restoration.
    3. On the Backup Settings tab, click Edit. In the Backup Settings dialog box, 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.