TencentDB for MySQL supports transition-to-cold storage for backup files to reduce the backup storage costs. This document describes how to use this feature.
Note:
The cluster edition of the instance currently does not support the backup archiving feature.
The free space is not applicable to transitioned backups.
The archive storage type isn't available yet.
Overview
Transition-to-cold storage: The feature automatically transitions the storage types of generated data and binlog backup files according to the configured transition-to-cold storage rules to reduce the storage costs.
After you configure the backup retention period in Auto-Backup Settings, backup files will be stored according to the backup policy. Within the configured retention period, you can transition the backup files generated N or X days (customizable) ago to standard or archive storage respectively through the transition-to-cold storage feature.
Backup file storage types
Standard storage: It is suitable for business scenarios with frequent access and use. It can be used for rollback and cloning, uses no free space, and only supports downloads over the private network.
Archive storage: Suitable for business scenarios with lower access frequency, Archive Storage mandates a minimum retention period of 90 days. If the storage duration is less than 90 days, fees will be calculated based on the 90-day minimum. Downloading is not supported.
Feature overview
You can configure to transition backup files generated a certain number of days ago to standard storage. The number can range from 30 days to the configured number of backup retention days.
You can configure to transition backup files generated a certain number of days ago to archive storage. The number can range from 90 days to the configured number of backup retention days.
The backup storage type can only be transitioned from hot to cold (general storage > standard storage > archive storage) but not vice versa.
All the configured transition-to-cold storage policies will be performed at 00:00 (GMT+08:00) on the next day. As lifecycle tasks are executed asynchronously, the execution for backups after the rule is configured will be finished by 24:00 on the next day in most cases. The time is calculated based on the modification time of the transition-to-cold storage configuration.
Transition-to-cold storage can be configured for data backups and binlog backups separately.
Transition-to-cold storage can be used together with periodic archive.
Backup files in standard storage can only be downloaded through the private network. Downloading through the public network is not supported. Backup files in archive storage cannot be downloaded through either the private or public network.
Billing overview
Transitioned backups are stored at lower prices to reduce the storage costs. For billing details, see Backup Space Billing. Transition-to-cold storage policy
1. When the backup retention period is ≤ 31 days, cold storage for backups cannot be configured. To enable this feature, please set the backup retention period to more than 31 days.
2. When 31 days < backup retention period ≤ 180 days, the number of days for archive storage cannot be configured.
3. The number of days for standard storage cannot exceed or equal the number of days for archive storage.
4. Both the standard storage duration and archive storage duration must be less than the backup retention period.
5. A transition-to-cold storage rule only takes effect after it is selected.
Configuring transition-to-cold storage
1. Log in to the TencentDB for MySQL console, click an Instance ID on the instance list page to enter the management page, and select Backup and Restoration > Auto-Backup Settings. 2. In the Backup Settings pop-up window, configure the data backup retention period and cycle or configure the log backup retention period, select the target transition-to-cold storage policy, and specify the number of days.
3. Read and select Backup Space Billing Notes and click OK.
Examples of transition-to-cold storage
Example 1: Non-archive backup + transition-to-cold storage configurationBackground
Company A has a TencentDB for MySQL instance in Guangzhou region. The data backup retention period is 200 days, and the non-archive backup cycle is every Monday, Wednesday, Friday, and Sunday. On December 31, 2022, the following transition-to-cold storage policy is configured: after a backup file is generated for 90 or 180 days, it will be transitioned to standard or archive storage respectively.
Transition expectations
The transition-to-cold storage policy takes effect on January 1, 2023.
Existing backup files: Starting from January 1, 2023, existing backup files generated for more than 90 or 180 days are transitioned to standard or archive storage respectively.
New backup files: Starting from January 1, 2023, newly generated backup files are transitioned to standard or archive storage respectively after 90 or 180 days.
Example 2: Archive backup + transition-to-cold storage configurationBackground
Company B has a TencentDB for MySQL instance in Guangzhou region. The data backup retention period is 365 days, the non-archive backup cycle is every Monday, Wednesday, Friday, and Sunday, the archive backup retention period is 365 days, and one backup file is retained periodically per month. On January 31, 2023, the following transition-to-cold storage policy is configured: after a backup file is generated for 90 or 180 days, it will be transitioned to standard or archive storage respectively.
Transition expectations
The transition-to-cold storage policy takes effect on February 1, 2023.
Existing backup files: Starting from February 1, 2023, existing backup files generated for more than 90 or 180 days are transitioned to standard or archive storage respectively.
New backup files: Starting from February 1, 2023, newly generated backup files are transitioned to standard or archive storage respectively after 90 or 180 days.
In the backup retention schedule shown in the figure below, each newly generated backup file will be transitioned according to the time configured in the transition-to-cold storage policy, and backups can be transitioned only from hot to cold.