This topic describes how to use the cross-region backup feature for an ApsaraDB RDS for MySQL instance. After you enable the feature, the backup files of the RDS instance are automatically replicated from the source region to the destination region. You can use this feature for regulatory compliance and disaster recovery.
For more information about the default backup feature of ApsaraDB RDS for MySQL, see Use the automatic backup feature.
For more information about how to use the cross-region backup feature for an ApsaraDB RDS for PostgreSQL instance, see Use the cross-region backup feature.
For more information about how to use the cross-region backup feature for an ApsaraDB RDS for SQL Server instance, see Use the cross-region backup feature.
Differences between the cross-region backup feature and the default backup feature
Item | Cross-region backup | Default backup |
Default configuration | By default, this feature is disabled. If you want to use the cross-region backup feature, you must manually enable the feature. | By default, the feature is enabled. |
Storage | Backup files are stored in a region that is different from the region of the RDS instance. | Backup files are stored in the region in which the RDS instance resides. |
Restoration | Data can be restored to one of the following RDS instances:
Note If your RDS instance uses cloud disks, you can restore the data only to a new RDS instance in the destination region. | Data can be restored to one of the following RDS instances:
|
Retention period |
| By default, the backup files of an RDS instance are retained for seven days after the RDS instance is released. |
Procedure
RDS instances that use cloud disks
Prerequisites
Your RDS instance meets the following requirements:
The RDS instance runs MySQL 5.7 or MySQL 8.0.
The RDS instance runs RDS Basic Edition, RDS High-availability Edition, or RDS Cluster Edition.
The RDS instance uses cloud disks. Serverless RDS instances are not supported.
NoteYou can go to the Basic Information page of the RDS instance to obtain the preceding information.
The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account when you use the backup feature of ApsaraDB RDS for the first time. For more information, see How do I create a service-linked role for DBS?
If your RDS instance uses Enterprise SSDs (ESSDs) and the cloud disk encryption feature is enabled for the RDS instance, the cross-region backup feature is not supported. For more information about how to check whether the cloud disk encryption feature is enabled for an RDS instance that uses cloud disks, see Use the cloud disk encryption feature.
Billing rules
The following table describes the fees that are generated if you perform cross-region backups on an RDS instance that uses cloud disks in the ApsaraDB RDS console.
Item | Region | Unit price (USD per GB-day) |
Cross-region storage fee | China (Beijing), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Chengdu), China (Qingdao), China (Guangzhou), and China (Zhangjiakou) | 0.0009375 |
China (Hong Kong), US (Silicon Valley), US (Virginia), Singapore, Japan (Tokyo), Germany (Frankfurt), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UK (London), South Korea (Seoul), and Thailand (Bangkok) | 0.001125 | |
Network traffic fee | For more information about the billing rules for each region, see Network traffic fees. |
If your RDS instance contains a large amount of data, we recommend that you use DBS network plans to offset the network traffic fees. For more information, see Use network plans.
Usage notes
If you want to enable the cross-region backup feature for an RDS instance in the ApsaraDB RDS console, take note of the following items:
The cross-region backup feature allows you to restore the data of your RDS instance only to a region that is different from the region of the RDS instance.
Cross-region backups do not affect automatic backups. These types of backups can exist at the same time.
After a default backup is complete, a cross-region backup is triggered. During the cross-region backup process, the system dumps the generated default backup files of the RDS instance to the destination region.
After you enable the cross-region backup feature, the system does not immediately perform backups.
After you enable the cross-region log backup feature, the system only dumps all logs generated after you enable the feature.
Data backup files and log backup files that are generated by using the cross-region backup feature cannot be downloaded.
The cross-region backup feature for ApsaraDB RDS for MySQL supports only secondary links in some Alibaba Cloud regions due to network reasons. The following table describes the Alibaba Cloud regions in which the feature is supported.
ImportantThe cross-region backup feature allows you to replicate backup files from one Alibaba Cloud region to another, regardless of whether the regions are in or outside the Chinese mainland.
The cross-region backup feature allows you to restore the data of your RDS instance only to a region that is different from the region of the RDS instance. The available destination regions vary based on your network environment.
Supported environment
Region
In the Chinese mainland
China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), China (Qingdao), China (Guangzhou), China (Ulanqab), China (Heyuan), China (Chengdu), China (Hohhot), and China (Zhangjiakou)
Outside the Chinese mainland
China (Hong Kong), US (Silicon Valley), US (Virginia), Singapore, Japan (Tokyo), Germany (Frankfurt), Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UK (London), South Korea (Seoul), and Thailand (Bangkok)
Procedure
Enable the cross-region backup feature
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Backup Strategy tab. Then, click Edit in the Cross-region Backup Settings section.
NoteIf the Cross-region Backup Settings section is not displayed, you must check whether the RDS instance meets all prerequisites.
Configure the following parameters.
Parameter
Description
Cross-region Backup
Specifies whether to enable the cross-region backup feature. Select Enable.
Backup Region
The destination region to which the backup files of the RDS instance are automatically replicated.
Cross-region Backup Retention Period (Days)
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.
NoteAfter the RDS instance expires or is released, its cross-region backup files are still retained based on the specified retention period. You can log on to the ApsaraDB RDS console and go to the Cross-region Backups tab on the
page of your RDS instance to view the cross-region backup files that do not expire.Cross-region Log Backup
Specifies whether to enable the cross-region log backup feature. After you enable the feature, the log backup files of the RDS instance are automatically replicated to an OSS bucket in the destination region.
Compliance Warranty Regarding Cross-border Data Transfers
The relevant agreement. Read and select the relevant agreement.
Click OK.
Modify the cross-region backup settings
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Backup Strategy tab. Then, click Edit in the Cross-region Backup Settings section.
NoteIf the RDS instance is released, you can change only the cross-region backup retention period.
Click OK.
Disable the cross-region backup feature
If you no longer require the cross-region backup feature, you can disable the feature.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Backup Strategy tab. Then, click Edit in the Cross-region Backup Settings section.
Change the value of the Cross-region Backup parameter to Disabled and the value of the Cross-region Backup Retention Period (Days) parameter to 7.
NoteAfter you disable the cross-region backup feature, no new cross-region backup files or traffic fees are generated. However, the existing cross-region backup files are retained within their retention period that is specified before the cross-region backup feature is disabeld. These backup files are not cleared until all backup sets expire.
Click OK.
View the cross-region backup sets
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Cross-region Backups tab and set the Region of Backup Set parameter to the region in which the cross-region backup sets are stored to view the cross-region backup sets.
RDS instances that use local disks
Prerequisites
Your RDS instance meets the following requirements:
The RDS instance runs MySQL 8.0, MySQL 5.7, or MySQL 5.6.
The RDS instance runs RDS High-availability Edition or MySQL 5.7 on RDS Enterprise Edition.
The RDS instance uses local disks.
NoteYou can go to the Basic Information page of your RDS instance to obtain the preceding information.
The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account when you use the backup feature of ApsaraDB RDS for the first time. For more information, see How do I create a service-linked role for DBS?
Billing rules
The following table describes the fees that are generated if you perform cross-region backups on an RDS instance that uses local disks in the ApsaraDB RDS console.
Item | Unit price (USD per GB-hour) |
Cross-region storage fee | 0.0002 |
Network traffic fee | For more information about the billing rules for each region, see Network traffic fees. |
If your RDS instance contains a large amount of data, we recommend that you use DBS network plans to offset the network traffic fees. For more information, see Use network plans.
Usage notes
If you want to enable the cross-region backup feature for an RDS instance in the ApsaraDB RDS console, take note of the following information:
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.
Cross-region backups do not affect automatic backups. These types of backups can exist at the same time.
After a default backup is complete, a cross-region backup is triggered. During the cross-region backup process, the system dumps the generated default backup files of the RDS instance to the destination region.
After you enable the cross-region log backup feature, the system checks whether valid backup sets are generated for the RDS instance over the most recent 24 hours. If no valid backup sets are generated over the most recent 24 hours, a full backup is triggered for the RDS instance.
After you enable the cross-region log backup feature, the system checks the valid backup sets that are generated for the RDS instance over the most recent 24 hours.
If continuous log files are archived following the valid backup sets, the system dumps the archived log files to the destination region.
If no continuous log files are archived following the valid backup sets, a backup is triggered on the secondary RDS instance.
The cross-region backup feature is not supported in some Alibaba Cloud regions due to network reasons. The following table describes the Alibaba Cloud regions in which the feature is supported.
The cross-region backup feature for ApsaraDB RDS for MySQL supports only secondary links in some Alibaba Cloud regions due to network reasons. The following table describes the Alibaba Cloud regions in which the feature is supported.
ImportantThe cross-region backup feature allows you to replicate backup files from one Alibaba Cloud region to another, regardless of whether the regions are in or outside the Chinese mainland.
The cross-region backup feature allows you to restore the data of your RDS instance only to a region that is different from the region of the RDS instance. The available destination regions vary based on your network environment.
Supported environment
Region
In the Chinese mainland
China (Beijing), China (Shanghai), China (Hangzhou), China (Shenzhen), China (Qingdao), China (Guangzhou), China (Ulanqab), China (Heyuan), China (Chengdu), China (Hohhot), and China (Zhangjiakou)
Outside the Chinese mainland
China (Hong Kong), US (Silicon Valley), US (Virginia), Singapore, Japan (Tokyo), Germany (Frankfurt), Australia (Sydney) Closing Down, Malaysia (Kuala Lumpur), Indonesia (Jakarta), Philippines (Manila), UK (London), South Korea (Seoul), and Thailand (Bangkok)
Procedure
Enable the cross-region backup feature for a single RDS instance
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.
Find the RDS instance for which you want to enable the cross-region backup feature. In the Actions column, choose
.NoteYou can also go to the Backup and Restoration page, click the Backup Strategy tab, and then click Edit in the Cross-region Backup Settings section.
If the Cross-region Backup Settings section is not displayed, you must check whether the RDS instance meets all prerequisites.
Configure the following parameters.
Parameter
Description
Cross-region Backup
Specifies whether to enable the cross-region backup feature. Select Enable.
Backup Region
The destination region to which the backup files of the RDS instance are automatically replicated.
Cross-region Backup Retention Period (Days)
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.
NoteAfter 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 perform the following operations to view the cross-region backup files that do not expire: Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. On the page that appears, click the Cross-region Backup tab.
Cross-region Log Backup
Specifies whether to enable the cross-region log backup feature. After you enable the feature, the log backup files of the RDS instance are automatically replicated to an OSS bucket in the destination region.
Compliance Warranty Regarding Cross-border Data Transfers
The relevant agreement. Read and select the relevant agreement.
Click OK.
Enable the cross-region backup feature for multiple RDS instances at a time
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. In the top navigation bar, select the region in which the RDS instance resides.
Click the
tab. On the tab that appears, click the Pending Instances tab.Select the RDS instances for which you want to enable the cross-region backup feature. Then, click Backup Settings.
NoteYou can also click Settings in the Cross-region Backup Settings column of a single RDS instance to enable the cross-region backup feature only for that RDS instance.
Configure the following parameters.
Parameter
Description
Cross-region Backup
Specifies whether to enable the cross-region backup feature. Select Enable.
Backup Region
The destination region to which the backup files of the RDS instance are automatically replicated.
Cross-region Backup Retention Period (Days)
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.
NoteAfter 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 perform the following operations to view the cross-region backup files that do not expire: Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Backups. On the page that appears, click the Cross-region Backup tab.
Cross-region Log Backup
Specifies whether to enable the cross-region log backup feature. After you enable the feature, the log backup files of the RDS instance are automatically replicated to an OSS bucket in the destination region.
Compliance Warranty Regarding Cross-border Data Transfers
The relevant agreement. Read and select the relevant agreement.
Click OK.
Modify the cross-region backup settings
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Backup Strategy tab. Then, click Edit in the Cross-region Backup Settings section.
NoteIf the RDS instance is released, you can change only the cross-region backup retention period.
Click OK.
Disable the cross-region backup feature
If you no longer require the cross-region backup feature, you can disable the feature.
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the instance details page. In the left-side navigation pane, click Backup and Restoration. On the page that appears, click the Backup Strategy tab. Then, click Edit in the Cross-region Backup Settings section.
Change the value of the Cross-region Backup parameter to Disabled and the value of the Cross-region Backup Retention Period (Days) parameter to 7.
NoteAfter you disable the cross-region backup feature, no new cross-region backup files or traffic fees are generated. However, the existing cross-region backup files are retained within their retention period that is specified before the cross-region backup feature is disabeld. These backup files are not cleared until all backup sets expire.
Click OK.
Download the cross-region backup sets
After a cross-region backup is complete, you can download the generated cross-region backup sets 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 in which the RDS instance resides.
On the Backups page, click the
tab. Click the Backup Instances tab and click the ID of the RDS instance for which you want to download cross-region backup sets.On the Data Backup or Log Backup tab, find the backup set that you want to download and click Download in the Actions column.
Click Download.
ImportantIf you download backup files over an internal network, no fees are generated. If you download backup files over the Internet, you are charged for the Internet traffic that you use. For more information, see Network traffic fees.
View the cross-region backup sets
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which your RDS instance resides.
Go to the Backup and Restoration page of the instance. On the Cross-region Backups tab, view the cross-region backup sets.
References
After a cross-region backup is complete, you can restore the data of the RDS instance by using the generated cross-region backup files to an existing RDS instance or to a new RDS instance that resides in the destination region. For more information, see Restore data across regions.
For more information about how to modify the cross-region backup settings, such as the destination region to which the cross-region backup files can be replicated and the number of days for which the cross-region backup files are retained, or disable the cross-region backup feature, see Procedure.
You can also call the following API operations to perform operations related to the cross-region backup feature: