All Products
Search
Document Center

ApsaraDB for MongoDB:Configure cross-region backup for an instance

Last Updated:Dec 18, 2024

To ensure data security, ApsaraDB for MongoDB provides the cross-region backup feature to automatically back up data to another region. This feature can be used in scenarios in which data audit or disaster recovery is required.

Differences between the cross-region backup feature and the standard backup feature

Item

Cross-region backup

Standard backup

Default status

By default, the feature is disabled. If you want to use the feature, you must manually enable the feature.

By default, the feature is enabled.

Storage

Cross-region backup files are stored in a different region rather than the source region.

Standard backup files are stored in the current region.

Restoration

During the period of time within which the source instance does not expire, you can restore the instance data to a new instance in the destination region.

  • During the period of time within which the source instance does not expire, you can restore the instance data to a new instance in the current region.

  • After you release the source instance, you can use an available backup set in the recycle bin to re-create a new instance in the current region.

Retention period

After the instance is released, its cross-region backup files are still retained based on the specified cross-region backup retention period. If you do not want to retain cross-region backup files after releasing the instance, modify the cross-region backup retention period before releasing the instance.

  • Before the instance is released, standard backup files are retained based on the specified retention period.

  • After the instance is released, standard backup files are retained based on a specified retention policy.

Prerequisites

  • The instance is a replica set or sharded cluster instance.

  • The instance uses Enterprise SSDs (ESSDs) to store data.

  • The cross-region backup feature is not supported for instances for which disk encryption is enabled. For more information about how to check whether the disk encryption feature is enabled for an instance that uses cloud disks, see Disk encryption.

Billing rules

Cross-region backup fees consist of storage fees and network traffic fees. The following table describes the billable items.

Billable item

Region

Unit price (CNY per GB per day)

Cross-region backup storage

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

0.006

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

Network traffic

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

Usage notes

  • The cross-region backup feature allows you to back up data to a different region other than the region where the instance resides. You can restore backup data only to the region where cross-region backup sets reside.

  • Cross-region backup files do not affect standard backup files. These two types of backup files can exist on instances at the same time.

  • The cross-region backup feature allows you to dump all manual backup files, the first standard backup file of the day, and the first high-frequency backup file of the day.

  • Data and log backup files that are generated by using the cross-region backup feature cannot be downloaded.

  • The source and destination regions supported by the cross-region backup feature are limited. The following table describes the supported regions.

    Supported regions

    Area

    Supported regions

    Regions in China

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

    Regions outside China

    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)

    Note

    The preceding information is for reference only. The information of support for regions displayed in the ApsaraDB for MongoDB console shall prevail.

Enable the cross-region backup feature

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.

  2. In the left-side navigation pane of the instance details page, click Backup and Restoration.

  3. Click Backup Settings.

  4. In the Backup Settings panel, select Cross-region Backup under Advanced Features and configure the following parameters.

    Parameter

    Description

    Source Region

    The value is set to the region where the instance resides and cannot be changed.

    Backup Region

    The region to which the backup files are dumped. The region cannot be the same as the source region.

    Retention Type

    The retention type of the backup files. Valid values: Retain Data for Some Time and Retain Data Permanently.

    Retention Period (Days)

    The retention period of the cross-region backup files. Valid values: 3 to 1825. Unit: day.

    Note

    This parameter is required only when the Retention Type parameter is set to Retain Data for Some Time.

    Day of Week

    The day of week on which you want to dump the cross-region backup files.

    For example, if you select Monday and Wednesday, the system dumps the backup files generated on Monday and Wednesday to a different region. The backup files include all manual backup files, the first regular backup file of the day, and the first high-frequency backup file of the day.

    Log Backup Status

    Specifies whether to enable the log backup feature.

    Note
    • The cross-region log backup feature is not supported for replica set instances.

    • To restore the data of a sharded cluster instance across regions, enable the feature. The feature cannot be disabled for the instance.

    Compliance Statement

    After you confirm the compliance statement, select I have read and agreed to the compliance statement.

    Note

    For more information about other configuration items, see Configure automatic backup for an ApsaraDB for MongoDB instance.

  5. Click OK.

Modify the cross-region backup settings

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.

  2. In the left-side navigation pane of the instance details page, click Backup and Restoration.

  3. Click Backup Settings.

  4. In the Backup Settings panel, modify the parameters under Cross-region Backup in the Advanced Features section.

    Parameter

    Description

    Source Region

    The value is set to the region where the instance resides and cannot be changed.

    Backup Region

    The region to which the backup files are dumped. The region cannot be the same as the source region.

    Retention Type

    The retention type of the backup files. Valid values: Retain Data for Some Time and Retain Data Permanently.

    Retention Period (Days)

    The retention period of the cross-region backup files. Valid values: 3 to 1825. Unit: day.

    Note

    This parameter is required only when the Retention Type parameter is set to Retain Data for Some Time.

    Day of Week

    The day of week on which you want to dump the cross-region backup files.

    For example, if you select Monday and Wednesday, the system dumps the backup files generated on Monday and Wednesday to a different region. The backup files include all manual backup files, the first regular backup file of the day, and the first high-frequency backup file of the day.

    Log Backup Status

    Specifies whether to enable the log backup feature.

    Note
    • The cross-region log backup feature is not supported for replica set instances.

    • To restore the data of a sharded cluster instance across regions, enable the feature. The feature cannot be disabled for the instance.

    Compliance Statement

    After you confirm the compliance statement, select I have read and agreed to the compliance statement.

  5. Click OK.

Other operations

View the cross-region backup files

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.

  2. In the left-side navigation pane of the instance details page, click Backup and Restoration.

  3. Click the Cross-region Backup tab.

  4. On the Cross-region Backup tab, view the cross-region backup files of the instance.

Disable the cross-region backup feature

Important

After the cross-region backup feature is disabled, new backup fees and network traffic fees are not generated in ApsaraDB for MongoDB. However, existing backup files are not immediately deleted and the storage fees for the backup files continue to be generated.

To avoid additional fees, we recommend that you change the value of the Retention Period (Days) parameter to 3 days before you disable the feature. The cross-region backup files are automatically deleted after three days and cross-region backup storage fees are no longer generated. For more information about how to modify the cross-region backup retention period, see Modify the cross-region backup settings.

  1. Go to the Replica Set Instances or Sharded Cluster Instances page. In the top navigation bar, select the region in which the instance resides. Then, find the instance and click the ID of the instance.

  2. In the left-side navigation pane of the instance details page, click Backup and Restoration.

  3. Click Backup Settings.

  4. Deselect Cross-region Backup.

  5. Click OK.

Cross-region backup restoration

For more information about how to restore the data of an instance from the source region to an existing instance or to a new instance in the destination region, see Restore the data of an ApsaraDB for MongoDB instance across regions.

Related API operations

Operation

Description

DescribeBackups

Queries the backup files of an ApsaraDB for MongoDB replica set instance.

DescribeClusterBackups

Queries the backup sets of an ApsaraDB for MongoDB sharded cluster instance.

ModifyBackupPolicy

Modifies the backup policy of an ApsaraDB for MongoDB instance.

DescribeBackupPolicy

Queries the backup policy of an ApsaraDB for MongoDB instance.

CheckRecoveryCondition

Checks whether an ApsaraDB for MongoDB instance meets the data restoration conditions.