All Products
Search
Document Center

ApsaraDB RDS:Use the cross-region backup feature

Last Updated:Nov 28, 2023

This topic describes how to use the cross-region backup feature for an ApsaraDB RDS for PostgreSQL instance. After you enable the feature, the backup files of the RDS instance can be replicated from the source region to the destination region. You can use the backup files in the destination region to for regulatory compliance and disaster recovery.

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 a new RDS instance that resides in the destination region. For more information, see Restore the data of an ApsaraDB RDS for PostgreSQL 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, the 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.

Backup 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:

  • 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 can be restored to one of the following RDS instances:

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

  • Original RDS instance

Retention period

If an RDS instance is released, the backup files are still retained based on the cross-region backup retention period that you specify.

By default, the backup files of an RDS instance are retained for seven days after the RDS instance is released.

Prerequisites

  • The RDS instance meets the following requirements:

    • If the RDS instance uses local disks, the instance runs PostgreSQL 9.4 or PostgreSQL 10 on RDS High-availability Edition.

    • If the RDS instance uses cloud disks, the instance runs PostgreSQL 10, PostgreSQL 11, PostgreSQL 12, PostgreSQL 13, PostgreSQL 14, or PostgreSQL 15. Serverless RDS instances are not supported.

      Note

      If your RDS instance uses enhanced SSDs (ESSDs) and cloud disk encryption is enabled for the RDS 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, see Use the cloud disk encryption feature.

  • The AliyunServiceRoleForDBS service-linked role is created by using your Alibaba Cloud account if 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?

  • The RDS instance does not use a new general-purpose instance type.

    Note

    The new general-purpose instance types deliver better scalability and performance and reduce the time to create an RDS instance or change the specifications of an RDS instance. The new general-purpose instance types do not support the cross-region backup feature. For more information, see Instance types for primary ApsaraDB RDS for PostgreSQL instances.

Billing rules

The following fees are generated if you perform cross-region backups on an RDS instance in the ApsaraDB RDS console:

  • Cross-region storage fee: USD 0.0002 per GB-hour

  • Network traffic fee. For more information, see Network traffic fees.

Note

If your RDS instance contains a large amount of data, we recommend that your use DBS storage plans to offset the network traffic fees. For more information, see Storage fees.

Usage notes

  • The cross-region backup feature is not supported by RDS instances for which cloud disk encryption is enabled.

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

  • 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 region other than the source region. The available destination regions vary based on your business requirements.

    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

    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. 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 of the RDS instance, click the Backup Settings tab, and then click Edit in the Cross-region Backup Settings section.

      • 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 Retention Period

      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 and go to the Backup and Restoration tab on the Cross-region Backups page of your RDS instance to view the cross-region backup files that do not expire.

      Cross-region Log Backup

      Specify whether to enable the cross-region log backup feature. After you enable the cross-region log backup feature, the log backup files of the RDS instance are automatically replicated to an Object Storage Service (OSS) bucket in the destination region.

      Compliance Commitments 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 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 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 change only the cross-region backup retention period.

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

    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 find the RDS instance for which you want to disable the cross-region backup feature. Then, click Settings in the Cross-region Backup Settings column.

    3. Change the values of the Cross-region Backup Status parameter to Disabled and the Cross-region Retention Period 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. For more information, see the Modify the cross-region backup settings of an RDS instance section of this topic. 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.

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

    After a cross-region backup is completed for your RDS instance in the ApsaraDB RDS console, you can download the cross-region backup sets.

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

    3. On the Data Backup tab or the Log Backup tab, find the backup set that you want to download and click Download in the Actions column.

    4. Read and select the agreement, and click Download.

      Note

      If you download backup sets over an internal network, the traffic is free of charge. If you download backup sets over the Internet, the traffic is charged. 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. You can set the cross-region backup retention period to seven days. For more information, see the Modify the cross-region backup settings of an RDS instance section of this topic. 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 backup set that can be used to restore data across regions.

CreateDdrInstance

Restores the data of an instance to a new instance that resides in a region that is different from 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 region and the cross-region backup settings of the instances.