This topic describes how to enable cross-region backups for an ApsaraDB RDS for MySQL instance. After you enable cross-region backups, the backup files of the original RDS instance are automatically replicated from the source region to a specified destination region. You can use the backup files in the destination region to manage and restore the data of the original RDS instance.
Background information
If a cross-region backup is complete, you can restore the data of the original RDS instance from the generated cross-region backup file to an existing RDS instance or to a new RDS instance that resides in the destination region. For more information, see Restore the data of an ApsaraDB RDS for MySQL instance across regions.
- For more information about default backups, see Enable automatic backups for an ApsaraDB RDS for MySQL instance.
- For more information about how to enable cross-region backups for an ApsaraDB RDS for PostgreSQL instance, see Enable cross-region backups for an ApsaraDB RDS for PostgreSQL instance.
- For more information about how to enable cross-region backups for an ApsaraDB RDS for SQL Server instance, see Enable cross-region backups for an ApsaraDB RDS for SQL Server instance.
Differences between cross-region backups and default backups
Item | Cross-region backup | Default backup |
---|---|---|
Default configuration | By default, cross-region backups are disabled. You must manually enable cross-region backups. | By default, default backups are enabled. |
Storage | Cross-region backup files are stored in a region that is different from the region of the original RDS instance. | Default backup files are stored in the region where the original RDS instance resides. |
Restoration | Data from cross-region backup files can be restored to the following RDS instances:
|
Data from default backup files can be restored to the following RDS instances:
|
Retention period | After the original RDS instance is released, its cross-region backup files are still retained based on the cross-region backup retention period that you specify. | By default, after the original RDS instance is released, its default backup files are retained for seven days. |
Prerequisites
Where to perform cross-region backups | Prerequisite |
---|---|
ApsaraDB RDS console | The original RDS instance runs one of the following MySQL versions and RDS editions:
|
DBS |
|
Billing
Where to perform cross-region backups | Billing |
---|---|
ApsaraDB RDS console | You are charged for the storage and traffic that are consumed by the cross-region
backup files.
|
DBS | If you want to store cross-region backup files in the built-in storage of DBS, you are charged for the storage that you use in DBS. For more information, see Billing overview. |
Precautions
- You can restore data from cross-region backup files to the source region or the destination region. However, if Transparent Data Encryption (TDE) is enabled for the original RDS instance, you can restore data from cross-region backup files only to the source region. For more information, see Configure TDE for an ApsaraDB RDS for MySQL instance.
- Cross-region backups do not affect default backups. These two types of backups exist at the same time.
- After a default backup is complete, a cross-region backup is triggered. During the cross-region backup process, the original RDS instance dumps the generated default backup files to the destination region.
- After you enable cross-region backups, the original RDS instance checks whether valid data backup files are generated over the most recent 24 hours. If no valid data backup files are generated over the most recent 24 hours, the original RDS instance triggers a backup on its secondary RDS instance.
- After you enable cross-region log backups, the original RDS instance checks the valid
data backup files that are generated over the most recent 24 hours.
- If continuous binary log files are generated following the valid data backup files, the original RDS instance dumps the binary log files to the destination region.
- If no continuous binary log files are generated following the valid data backup files, the original RDS instance triggers a backup on its secondary RDS instance.
- Cross-region backups are supported only in a few Alibaba Cloud regions due to network
reasons. The following table lists the Alibaba Cloud regions in which cross-region
backups are supported.
Source region Destination region China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Hong Kong), China (Ulanqab), China (Chengdu), China (Guangzhou), and China (Heyuan) China (Hong Kong), China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), China (Zhangjiakou), China (Hohhot), China (Beijing), China (Ulanqab), China (Chengdu), China (Guangzhou), and China (Heyuan) Note The backup files from a source region can be dumped to regions except the source region. The available destination regions may vary based on your network environment.US (Silicon Valley) US (Virginia) US (Virginia) US (Silicon Valley) China East 1 Finance China East 2 Finance and China South 1 Finance China East 2 Finance China East 1 Finance and China South 1 Finance China South 1 Finance China East 1 Finance and China East 2 Finance
Configure cross-region backups in the ApsaraDB RDS console
- To enable cross-region backups for a single RDS instance, perform the following operations:
- Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the RDS instance resides.
- Find the RDS instance for which you want to enable cross-region backups. In the Actions
column, choose Note
- You can also go to the Backup and Restoration page, click the Backup Settings tab, and then click Edit in the Cross-region Backup Settings section.
- If the Cross-region Backup Settings tab cannot be found, you must check whether the RDS instance meets all prerequisites.
.
- Configure the following parameters.
Parameter Description Cross-region Backup Status Specify whether to enable or disable cross-region backups. Select Enable. Backup Region Select the destination region to which the backup files of the RDS instance are automatically replicated. Cross-region Retention Period Specify the retention period of cross-region backup files. Valid values: 7 to 1825. Unit: days. The longest cross-region backup retention period spans five years. Note After the RDS instance expires or is released, its cross-region backup files are still retained based on the cross-region backup retention period that you specify. You can log on to the ApsaraDB RDS console, click Backups in the left-side navigation pane, and then click the Cross-region Backup tab to view the cross-region backup files that are retained.Cross-region Log Backup Status: Specify whether to enable or disable cross-region log backups. After you enable cross-region log backups, the log backup files of the RDS instance are automatically replicated to a specified Object Storage Service (OSS) bucket in the destination region. - Click OK.
- To enable cross-region backups for multiple RDS instances at a time, perform the following
operations:
- Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region where the RDS instance resides.
- Click the Pending Instances tab. tab. On the tab that appears, click the
- Select the RDS instances for which you want to enable cross-region backups. Then,
click Backup Settings.
Note You can also click Settings in the Cross-region Backup Settings column of a single RDS instance to enable cross-region backups only for that RDS instance.
- Configure the following parameters.
Parameter Description Cross-region Backup Status Specify whether to enable or disable cross-region backups. Select Enable. Backup Region Select the destination region to which the backup files of the RDS instance are automatically replicated. Cross-region Retention Period Specify the retention period of cross-region backup files. Valid values: 7 to 1825. Unit: days. The longest cross-region backup retention period spans five years. Note After the RDS instance expires or is released, its cross-region backup files are still retained based on the cross-region backup retention period that you specify. You can log on to the ApsaraDB RDS console, click Backups in the left-side navigation pane, and then click the Cross-region Backup tab to view the cross-region backup files that are retained.Cross-region Log Backup Status: Specify whether to enable or disable cross-region log backups. After you enable cross-region log backups, the log backup files of the RDS instance are automatically replicated to a specified Object Storage Service (OSS) bucket in the destination region. - Click OK.
- To modify the cross-region backup settings of an RDS instance, perform the following
operations:
- Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region where the RDS instance resides.
- On the Backups page, click the Backup Instances tab and find the RDS instance whose cross-region backup settings you want to modify.
Then, click Settings in the Cross-region Backup Settings column to modify the cross-region backup settings
of the RDS instance.
Note If the RDS instance is released, you can modify only the cross-region backup retention period.
tab. Click the
- To disable cross-region backups for an RDS instance, perform the following operations:
If you no longer require cross-region backups, you can disable cross-region backups.
- Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region where the RDS instance resides.
- On the Backups page, click the Backup Instances tab and find the RDS instance for which you want to disable cross-region backups. Then, click Settings in the Cross-region Backup Settings column. tab. Click the
- In the dialog box that appears, set the Cross-region Backup Status parameter to Disabled and set the Cross-region Retention Period parameter to 7.
Note After you disable cross-region backups, no new cross-region backup files are generated. However, the existing cross-region backup files are still retained for at least seven days. You can set the cross-region backup retention period to seven days. After the seven-day retention period that you specify elapses, all existing cross-region backup files are automatically deleted. Then, you are no longer charged for the storage of cross-region backup files.
- Click OK.
- To download the cross-region data backup files of an RDS instance, perform the following
operations:
After a cross-region backup is complete, you can download the generated cross-region backup files in the ApsaraDB RDS console.
- Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region where the RDS instance resides.
- On the Backups page, click the Backup Instances tab and click the ID of the RDS instance for which you want to download cross-region backup files. tab. Click the
- On the Data Backup tab or the Log Backup tabs, click Download in the Actions column to download the full data backup file or the incremental backup file.
- Click Download.
Note If you download data backup files over an internal network, the traffic is free of charge. If you download data backup files the Internet, the traffic is charged. For more information, see Network traffic fees.
Enable cross-region backups for an RDS instance by using DBS
In this example, the source region is China (Hangzhou), and the destination region is China (Beijing).
To create a cross-region backup for an RDS instance, perform the following operations:
To download the data backup files of an RDS instance, perform the following operations:
- Log on to the DBS console.
- In the left-side navigation pane, click Backup Schedules. In the upper-left corner of the Backup Schedules page, select the region where you purchase the backup schedule. In this example, select the China (Beijing) region.
- Click the Schedule Name and go to the detail page.
- Multiple methods are provided to download data backup files on the detail page. For more information, see Overview.
FAQ
After I disable cross-region backups for my RDS instance, why am I still charged for the storage of cross-region backup files?
After you disable cross-region backups for your RDS instance, no new cross-region backup files are generated and you are no longer charged for the traffic that is consumed to transmit cross-region backup files. However, you are still charged for the storage of the existing cross-region backup files within the cross-region backup retention period that you specify. The existing cross-region backup files are retained for at least seven days. You can set the cross-region backup retention period to seven days. After the cross-region backup retention period that you specify elapses, all existing cross-region backup files are automatically deleted and you are no longer charged for the storage of cross-region backup files.
Related API operations
Operation | Description |
---|---|
Check cross-region backup | Checks whether an ApsaraDB RDS instance has a cross-region data backup file that can be used to restore data across regions. |
Restore data to a new instance across regions | Restores the data of an ApsaraDB RDS instance to a new RDS instance that resides in a different region than the source region. |
Modify cross-region backup settings | Modifies the cross-region backup settings of an ApsaraDB RDS instance. |
Query cross-region backup settings | Queries the cross-region backup settings of an ApsaraDB RDS instance. |
Query cross-region data backup files | Queries the cross-region data backup files of an ApsaraDB RDS instance. |
Query cross-region log backup files | Queries the cross-region log backup files of an ApsaraDB RDS instance. |
Query regions that support cross-region backup | Queries the available destination regions to which the cross-region backup files from a specified source region can be stored. |
Query the time range to which you can restore data by using a cross-region backup set | Queries the restorable time range that is supported by a specified cross-region backup file. |
Query ApsaraDB for RDS instances on which cross-region backup is enabled | Queries the ApsaraDB RDS instances for which cross-region backups are enabled in a specified region and the cross-region backup settings of these instances. |