This topic describes how to enable cross-region backups for an ApsaraDB RDS for PostgreSQL instance. After you enable cross-region backups, the backup files of the original RDS instance can be 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 original RDS instance.

Background information

You can use one of the following methods to enable cross-region backups:

You can use a cross-region backup file of the original RDS instance to restore data 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 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 different region than the original RDS instance. Default backup files are stored in the same region as the original RDS instance.
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
Data from default backup files can be restored to the following RDS instances:
  • New RDS instance in the source region
  • Original RDS instance
Backup retention period After the original RDS instance is released, the cross-region backup files of the instance are still retained based on the cross-region backup retention period that you specify. By default, the default backup files of the original RDS instance are retained only for seven days after the instance is released.

Prerequisites

If you enable cross-region backups by using Database Backup (DBS), your RDS instance must meet the following requirements:
  • DBS is activated, and a backup schedule is created. For more information, see Create a backup schedule.
  • The region that you specify on the DBS buy page is different from the region of the original RDS instance.
  • The Backup Method parameter is set to Logical Backup for the backup schedule that you want to use.

Billing

Where to perform cross-region backups Billing
ApsaraDB RDS console
  • Remote storage: USD 0.0002/GB/hour.
  • Network traffic: For more information, see Billing overview.
DBS For more information, see Billing overview.

Precautions

If you enable cross-region backups in the ApsaraDB RDS console, you must take note of the following information:

  • Cross-region backups do not interrupt default backups. These two types of backups can be created at the same time.
  • After a default backup is complete, a cross-region backup is triggered. During the 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 a valid data backup file is generated over the last 24 hours. If no valid data backup files are generated over the last 24 hours, the original RDS instance triggers a backup on its secondary RDS instance.
  • Cross-region backups are not supported in some Alibaba Cloud regions due to network issues. The following table lists the Alibaba Cloud regions where cross-region backups are supported.
    Source region Destination region
    China (Hangzhou) China (Shanghai), China (Qingdao), China (Shenzhen), China (Zhangjiakou), and China (Hohhot)
    China (Shanghai) China (Hangzhou), China (Qingdao), China (Shenzhen), China (Zhangjiakou), and China (Hohhot)
    China (Qingdao) China (Hangzhou), China (Shanghai), China (Shenzhen), China (Zhangjiakou), and China (Hohhot)
    China (Beijing) China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), China (Zhangjiakou), and China (Hohhot)
    China (Zhangjiakou) China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), and China (Hohhot)
    China (Hohhot) China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), and China (Zhangjiakou)
    China (Shenzhen) China (Hangzhou), China (Shanghai), China (Qingdao), China (Zhangjiakou), and China (Hohhot)
    China (Hong Kong) China (Hangzhou), China (Shanghai), China (Qingdao), China (Shenzhen), China (Zhangjiakou), and China (Hohhot)
    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

Enable cross-region backups in the ApsaraDB RDS console

  • To enable cross-region backups for a single RDS instance, perform the following steps:
    1. 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.
    2. Click the Cross-region Backup tab. On the tab that appears, click the Pending Instances tab.
    3. Find the RDS instance. Then, click Settings in the Cross-region Backup Settings column.
    4. Configure the following parameters.
      Parameter Description
      Cross-region Backup Status Enable or disable cross-region backups. Select Enable.
      Backup Region Select the destination region to which you want to store cross-region backup files. The backup files that are generated are automatically replicated to the destination region.
      Cross-region Retention Period Enter the number of days for which you want to retain cross-region backup files. Valid values: 7 to 1825. Cross-region backup files can be retained for up to five years.
      Note After the RDS instance expires or is released, the cross-region backup files of the instance are still retained based on the cross-region backup retention period that you specify. You can go to the Cross-region Backup page in the ApsaraDB RDS console to view the cross-region backup files that are retained.
      Cross-region Log Backup Status: Enable or disable cross-region log backups. After you enable cross-region log backups, the log backup files that are generated are automatically replicated to an Object Storage Service (OSS) bucket in the destination region.
    5. Click OK.
  • To enable cross-region backups for multiple RDS instances at a time, perform the following steps:
    1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Cross-region Backup. In the top navigation bar, select the region where these RDS instance reside.
    2. Click the Pending Instances tab.
    3. Select these RDS instances. Then, click Backup Settings below the instance list.
      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 the RDS instance.
    4. Configure the following parameters.
      Parameter Description
      Cross-region Backup Status Enable or disable cross-region backups. Select Enable.
      Backup Region Select the destination region to which you want to store cross-region backup files. The backup files that are generated are automatically replicated to the destination region.
      Cross-region Retention Period Enter the number of days for which you want to retain cross-region backup files. Valid values: 7 to 1825. Cross-region backup files can be retained for up to five years.
      Note After the RDS instance expires or is released, the cross-region backup files of the instance are still retained based on the cross-region backup retention period that you specify. You can go to the Cross-region Backup page in the ApsaraDB RDS console to view the cross-region backup files that are retained.
      Cross-region Log Backup Status: Enable or disable cross-region log backups. After you enable cross-region log backups, the log backup files that are generated are automatically replicated to an Object Storage Service (OSS) bucket in the destination region.
    5. Click OK.
  • To modify the cross-region backup settings of a single RDS instance, perform the following steps:
    1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Cross-region Backup. In the top navigation bar, select the region where the RDS instance resides.
    2. Find the RDS instance. In the Cross-region Backup Settings column, click Settings. In the dialog box that appears, modify the cross-region backup settings of the RDS instance based on your business requirements.
      Note If the RDS instance is released, you can modify only the cross-region backup retention period.
  • To disable cross-region backups for a single RDS instance, perform the following steps:

    You can disable cross-region backups based on your business requirements.

    1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Cross-region Backup. In the top navigation bar, select the region where the RDS instance resides.
    2. Find the RDS instance. In the Cross-region Backup Settings column, click Settings.
    3. Set the Cross-region Backup Status parameter to Disabled and 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 must set the cross-region backup retention period to seven days. After the cross-region backup retention period that you specify elapses, ApsaraDB RDS deletes all the existing cross-region backup files and you are no longer charged for the storage of the cross-region backup files.
    4. Click OK.

Enable cross-region backups by using DBS

  1. Log on to the Database Backup console.
  2. In the left-side navigation pane, click Backup Schedules.
  3. In the top navigation bar, select the region where the backup schedule that you created resides.
  4. Find the backup schedule. In the Actions column, click Configure Backup Schedule.
    Configure Backup Schedule button
  5. Enter the name of the backup schedule in the Schedule Name field. Then, configure the parameters in the Backup Source Information and Backup Destination Information sections.
    Configure Backup Schedule - Configure Backup Source and Destination
    Section Parameter Description
    Schedule Name -
    • DBS automatically generates a name for each backup schedule. You do not need to specify a unique name.
    • You can modify the name of the backup schedule based on your business requirements. We recommend that you specify an informative name that helps identify the backup schedule.
    Backup Source Information Backup Mode The backup method that you want to use. Default value: Logical Backup.
    Database Location The location of the databases that you want to back up. Select RDS Instance.
    RDS instance ID The ID of the original RDS instance.
    Note The original RDS instance and the backup schedule reside in different regions. Therefore, you can specify the RDS Instance ID parameter only after you specify the Instance Region parameter.
    Instance Region The region where the original RDS instance resides.
    Database Account The username of the account that is authorized to manage specific databases on the original RDS instance.
    Password The password of the account that is authorized to manage specific databases on the original RDS instance.
    SSL Encryption The type of connection that you want to establish. Select Non-encrypted or SSL-encrypted.
    Note If you want to select SSL-encrypted, you must enable SSL encryption for the original RDS instance before you configure the backup schedule. For more information, see Configure SSL encryption on an ApsaraDB RDS for MySQL instance.
    Backup Destination Information Backup Storage Type
    • DBS automatically creates an Object Storage Service (OSS) bucket for each backup schedule and fills the Backup Storage Type field with the name of the OSS bucket.
    • You can modify the name of the OSS bucket based on your business requirements. We recommend that you specify an informative name that can help identify the OSS bucket.
    Storage Encryption The method that you want to use to store data. Select Non-encrypted, Encrypted, or KMS Encrypted.
    Note If you select Encrypted, DBS encrypts the backup files by using AES 256.
  6. Click Test Connection. When Test Passed appears, click Next.
    Note After you click Test Connection, DBS creates an IP address whitelist for the original RDS instance. The IP address whitelist contains the CIDR block of the server on which DBS runs.
  7. Select databases and tables from the Available section, move them to the Selected section, and then click Next.
  8. Specify the backup time and click Next. In this step, you can set the Full-scale Backup Frequency parameter to Periodic Backup or Single Backup.
  9. Specify the lifecycle and click Precheck.
    Note For more information about how to configure the parameters in the Configure Backup Time and Edit Lifecycle steps, see Configure a backup schedule.
  10. After the backup task passes the precheck, click Start Task.
  11. Wait until the backup is complete.

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 for the transmission of 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. 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 that you specify elapses, ApsaraDB RDS deletes all the existing cross-region backup files and you are no longer charged for the storage of these cross-region backup files.

Related 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 the data of the instance.
Restore data to a new instance across regions Restores the data of an ApsaraDB RDS instance from a cross-region backup file to a new RDS instance.
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.