All Products
Search
Document Center

ApsaraDB RDS:Use the cross-region backup feature

Last Updated:Aug 31, 2023

ApsaraDB RDS for MySQL provides the cross-region backup feature. After you enable the cross-region backup feature for your ApsaraDB RDS for MySQL instance, the backup files of your RDS instance are automatically replicated from the source region to a specified destination region. This facilitates data management and restoration.

If a cross-region backup is complete, you can restore the data of the original RDS instance from 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 the data of an ApsaraDB RDS for MySQL instance across regions.

Note

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, this feature is enabled.

Storage

Cross-region backup files are stored in a region that is different from the region of the RDS instance.

Default backup files are stored in the region in which the RDS instance resides.

Restoration

Data from cross-region backup files can be restored to the following RDS instances:

  • Original RDS instance

  • New RDS instance in the destination region

  • Existing RDS instance

Note

If your RDS instance uses cloud disks, you can restore the data only to a new RDS instance in the destination region.

Data from default backup files can be restored to the following RDS instances:

  • New RDS instance that resides in the same region as the original RDS instance

  • Original RDS instance

Retention period

If the 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, if the RDS instance is released, its default backup files are retained for seven days.

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 or RDS High-availability Edition.

    • The RDS instance uses cloud disks. Serverless RDS instances are not supported.

    Note
    • You can go to the Basic Information page of your RDS instance to view the preceding information.

    • You cannot use the cross-region backup feature for RDS instances that run RDS Cluster Edition in the ApsaraDB RDS console. Instead, you can use DBS cross-region backup features.

  • If this is the first time you use the backup feature of ApsaraDB RDS, you must attach the AliyunServiceRoleForDBS policy by using your Alibaba Cloud account. For more information, see How do I create a service-linked role for DBS?

  • If your RDS instance uses enhanced SSDs (ESSDs) and cloud disk encryption is enabled for the instance, the cross-region backup feature is not supported. For more information about how to check whether cloud disk encryption is enabled for an RDS instance that uses cloud disks, see Configure cloud disk encryption.

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

Cross-region storage fee

China (Beijing), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Chengdu), and China (Qingdao)

USD 0.0009375 per GB-day

China (Hong Kong), US (Silicon Valley), US (Virginia), Germany (Frankfurt), UK (London), Japan (Tokyo), Australia (Sydney), Malaysia (Kuala Lumpur), Indonesia (Jakarta), and India (Mumbai)

USD 0.001125 per GB-day

Network traffic fee

For more information about the billing rules for each region, see Network traffic fees.

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 default 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 original RDS instance dumps the generated default backup files to the destination region.

  • 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 is not supported in some Alibaba Cloud regions due to network reasons. The following table lists the Alibaba Cloud regions in which the feature is supported.

    Source region

    Destination region

    China (Qingdao), China (Beijing), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), and China (Chengdu)

    China (Beijing), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Shenzhen), China (Heyuan), China (Chengdu), and China (Qingdao)

    Note

    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.

    Singapore

    China (Hong Kong), US (Silicon Valley), US (Virginia), Germany (Frankfurt), UK (London), Japan (Tokyo), Australia (Sydney), Malaysia (Kuala Lumpur), Indonesia (Jakarta), and India (Mumbai)

    Germany (Frankfurt)

    US (Silicon Valley), US (Virginia), UK (London), Japan (Tokyo), Singapore, Australia (Sydney), Malaysia (Kuala Lumpur), Indonesia (Jakarta), and India (Mumbai)

Procedure

  • Enable the cross-region backup feature

    1. 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.
    2. 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 next to Cross-region Backup Settings.

      Note

      If Cross-region Backup Settings is not displayed, you must check whether the RDS instance meets all prerequisites.

    3. 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: 3 to 1825. 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 specified retention period. You can log on to the ApsaraDB RDS console and go to the Cross-region Backups tab on the Backup and Restoration 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 Object Storage Service (OSS) bucket in the destination region.

      Compliance Warranty Regarding Cross-border Data Transfers

      Read and select the relevant agreement.

    4. Click OK.

  • Modify the cross-region backup settings of an RDS instance

    1. 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.
    2. 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 next to Cross-region Backup Settings.

      Note

      If the RDS instance is released, you can change only the cross-region backup retention period.

    3. Click OK.

  • Disable the cross-region backup feature for an RDS instance

    If you no longer require the cross-region backup feature, you can disable the feature.

    1. 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.
    2. 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 next to Cross-region Backup Settings.

    3. 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.

      Note

      After you disable the cross-region backup feature for your RDS instance, no new cross-region backup files or traffic fees are generated. 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 seven-day retention period elapses, all existing cross-region backup files are automatically deleted. Then, you are no longer charged for the storage of cross-region backup files.

    4. Click OK.

  • Query and restore data backup sets

    1. 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.
    2. 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.

    3. On the Data Backup tab, find the required cross-region backup set and click Restore in the Actions column to restore the data to a new RDS instance by point in time or backup set.

      Note

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.

    Note

    You can go to the Basic Information page of your RDS instance to view the preceding information.

  • If this is the first time you use the backup feature of ApsaraDB RDS, you must attach the AliyunServiceRoleForDBS policy by using your Alibaba Cloud account. 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

Cross-region storage fee

USD 0.0002 per GB-hour

Network traffic fee

For more information about the billing rules for each region, see Network traffic fees.

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:

  • 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 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 original RDS instance dumps the generated default backup files to the destination region.

  • After you enable the cross-region backup feature, the original RDS instance checks whether valid backup sets are generated over the most recent 24 hours. If no valid backup sets are generated over the most recent 24 hours, a backup is performed on the secondary RDS instance of the original RDS instance.

  • After you enable the cross-region log backup feature, the original RDS instance checks the valid backup sets that are generated over the most recent 24 hours.

    • If continuous log files are generated following the valid backup sets, the original RDS instance replicates the generated log files to the destination region.

    • If no continuous log files are generated following the valid backup sets, the original RDS instance triggers a backup on its secondary RDS instance.

  • The cross-region backup feature is not supported in some Alibaba Cloud regions due to network reasons. The following table lists the Alibaba Cloud regions in which the feature is supported.

    Source region

    Destination region

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Shenzhen), China (Ulanqab), China (Chengdu), China (Guangzhou), China (Heyuan), and China (Hong Kong)

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), China (Zhangjiakou), China (Hohhot), China (Beijing), China (Ulanqab), China (Chengdu), China (Guangzhou), China (Heyuan), and China (Hong Kong)

    Note

    The backup files from the source region can be replicated to a different region from the source region. The available destination regions 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

Procedure

  • Enable the cross-region backup feature for a single RDS instance

    1. 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.

    2. Find the RDS instance for which you want to enable the cross-region backup feature. In the Actions column, choose More > Cross-region Backup Settings.

      Note
      • You can also go to the Backup and Restoration page, click the Backup Strategy tab, and then click Edit next to Cross-region Backup Settings.

      • If Cross-region Backup Settings is not displayed, you must check whether the RDS instance meets all prerequisites.

    3. 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.

      Retention Period of Cross-region Backup (Days)

      The retention period of cross-region backup files. Valid values: 3 to 1825. 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

      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

      Read and select the relevant agreement.

    4. Click OK.

  • Enable the cross-region backup feature for multiple RDS instances at a time

    1. 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.

    2. Click the Cross-region Backup tab. On the tab that appears, click the Pending Instances tab.

    3. Select the RDS instances for which you want to enable the cross-region backup feature. Then, click Backup Settings.

      image.png
      Note

      You 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.

    4. 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.

      Retention Period of Cross-region Backup (Days)

      The retention period of cross-region backup files. Valid values: 3 to 1825. 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

      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

      Read and select the relevant agreement.

    5. Click OK.

  • Modify the cross-region backup settings of an RDS instance

    1. 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.
    2. 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 next to Cross-region Backup Settings.

      Note

      If the RDS instance is released, you can change only the cross-region backup retention period.

    3. Click OK.

  • Disable the cross-region backup feature for an RDS instance

    If you no longer require the cross-region backup feature, you can disable the feature.

    1. 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.
    2. 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 next to Cross-region Backup Settings.

    3. 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.

      Note

      After you disable the cross-region backup feature for your RDS instance, no new cross-region backup files or traffic fees are generated. 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 seven-day retention period elapses, all existing cross-region backup files are automatically deleted. Then, you are no longer charged for the storage of cross-region backup files.

    4. Click OK.

  • Download the cross-region backup files of an RDS instance

    After a cross-region backup is complete, you can download the generated cross-region backup files in the ApsaraDB RDS console.

    1. 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.

    2. On the Backups page, click the Cross-region Backup tab. Click the Backup Instances tab and click the ID of the RDS instance for which you want to download cross-region backup files.

    3. On the Data Backup or Log Backup tab, click Download in the Actions column to download the full data backup file or the incremental backup file.

    4. Click Download.

      Important

      If 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.

FAQ

After I disable the cross-region backup feature for my RDS instance, why am I still charged for the storage of cross-region backup files?

After you disable the cross-region backup feature for your RDS instance, no new cross-region backup files or traffic fees are generated. 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. Therefore, you can set the cross-region backup retention period to seven days. For more information, see the Use the cross-region backup feature. After the cross-region backup retention period elapses, all existing cross-region backup files are deleted and you are no longer charged for the storage of cross-region backup files.

Related operations

Operation

Description

CheckCreateDdrDBInstance

Checks whether an instance has a cross-region data backup file that can be used to restore data across regions.

CreateDdrInstance

Restores the data of an instance to a new instance that resides in a different region than the source region.

ModifyInstanceCrossBackupPolicy

Modifies the cross-region backup settings of an instance.

DescribeInstanceCrossBackupPolicy

Queries the cross-region backup settings of an instance.

DescribeCrossRegionBackups

Queries the cross-region data backup files of an instance.

DescribeCrossRegionLogBackupFiles

Queries the cross-region log backup files of an instance.

DescribeAvailableCrossRegion

Queries the available destination regions to which the cross-region backup files from a specific source region can be replicated.

DescribeAvailableRecoveryTime

Queries the restorable time range that is supported by a specified cross-region backup file.

DescribeCrossRegionBackupDBInstance

Queries the instances for which the cross-region backup feature is enabled in a specified region and the cross-region backup settings of these instances.