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:

If a cross-region backup is complete, you can restore the data of the original RDS instance from the generated cross-region backup file 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 for seven days after the original RDS instance is released.

Prerequisites

If you enable cross-region backups in the ApsaraDB RDS console, the original RDS instance runs one of the following PostgreSQL versions and RDS editions:
  • PostgreSQL 10 on RDS High-availability Edition with local SSDs
  • PostgreSQL 9.4 on RDS High-availability Edition with local SSDs
If you enable cross-region backups by using DBS, your RDS instance must meet the following requirements:

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

  • Enable cross-region backups for a single 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 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 The switch that is used to control the cross-region backups. Select Enable.
      Backup Region The destination region to which you want to store cross-region backup files. ApsaraDB RDS automatically replicates backup files from the RDS instance to the destination region.
      Cross-region Retention Period The period of time for which you want to retain 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, 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: The switch that is used to control the cross-region log backup feature. After you enable this feature, ApsaraDB RDS automatically replicates log backup files from the RDS instance to a specified Object Storage Service (OSS) bucket in the destination region.
    5. 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 Cross-region Backup. In the top navigation bar, select the region where the RDS instances reside.
    2. Click the Backup Settings tab. On the tab that appears, click the Pending Instances tab.
    3. Select the 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 The switch that is used to control the cross-region backups. Select Enable.
      Backup Region The destination region to which you want to store cross-region backup files. ApsaraDB RDS automatically replicates backup files from the RDS instance to the destination region.
      Cross-region Retention Period The period of time for which you want to retain 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, 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: The switch that is used to control the cross-region log backup feature. After you enable this feature, ApsaraDB RDS automatically replicates log backup files from the RDS instance to a specified Object Storage Service (OSS) bucket in the destination region.
    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 Cross-region Backup. In the top navigation bar, select the region where the RDS instance resides.
    2. Click the Backup Settings tab. On the tab that appears, click the Backup Instance tab, find the destination instance, and then click Settings.
      Note If the RDS instance is released, you can modify only the cross-region backup retention period.
  • Disable cross-region backups for an RDS instance

    If you do not require cross-region backups, you can perform the following steps to disable cross-region backups:

    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. Click the Backup Settings tab. On the tab that appears, click the Backup Instance tab, find the destination instance, and then 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 for an RDS instance by using DBS

In this example, an ApsaraDB RDS for PostgreSQL instance that resides in the China (Hangzhou) region is backed up to the China (Beijing) region.

  1. Log on to the DBS console.
  2. In the left-side navigation pane, click Backup Schedules. In the upper-left corner of the Backup Schedules page, select the region where you purchase the backup schedule. In this example, select the China (Beijing) region.
  3. On the Backup Schedules page, find the ID of the backup schedule that you want to configure and click Configure Backup Schedule in the Actions column.
  4. In the Configure Backup Source and Destination step of the Configure Backup Schedule wizard, configure the backup source and destination, and click Next in the lower-right corner of the page.
    Geo-redundancy for an ApsaraDB RDS for MySQL instance
    Table 1. Configure Backup Schedule - Configure Backup Source and Destination
    Section Parameter Description
    - Schedule Name

    The name of the backup schedule. DBS generates a backup schedule name. We recommend that you set a descriptive name that is easy to identify. Backup schedule names do not have to be unique.

    Backup Source Information Backup Mode

    By default, the backup method that you selected when you purchased the backup schedule is used. In this example, this parameter is set to Logical Backup.

    Database Location The location of the databases that you want to back up. Select RDS Instance.
    Instance Region

    The region where the original RDS instance resides.

    In cross-region backups, select the region where the original RDS instance resides. In this example, select the China (Hangzhou) region.

    RDS Instance ID

    The ID of the original RDS instance.

    Database Account

    The username of the account that has the read permissions on specific databases of the original RDS instance in the ApsaraDB RDS console. For more information, see Account permissions.

    Password

    The password of the account used to connect to the database that you want to back up.

    After you enter the username and password of the database account, click Test Connection next to the password to check whether the information of the database that you want to back up is correct. If the specified parameters are valid, the Test Passed message appears. If the Test Failed message appears, click Check next to Test Failed. Modify the information about the instance that you want to back up based on the check results.

    SSL Encryption The type of connection that you want to establish. Valid values:
    • Non-encrypted
    • SSL-encrypted: Secure Sockets Layer (SSL) encrypts network connections at the transport layer to improve the security and integrity of data in transit. However, SSL increases the network connection response time.

      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 for an ApsaraDB RDS for PostgreSQL instance.

    Backup Destination Information Backup Storage Type The type of storage used to back up data. Valid values:
    • DBS Storage (recommended): Backup data is stored in DBS without requiring you to create storage space. You are charged based on the volume of your data that is stored in DBS. For more information about the billing method, see Storage fees.

      To reduce storage costs, we recommend that you use subscription storage plans. For more information, see Use storage plans.

    • OSS For User: You must create a bucket in the Object Storage Service (OSS) console in advance. For more information, see Create buckets.
    Note In this example, set this parameter to DBS Storage (recommended). If you set this parameter to OSS For User, you must set the OSS Bucket Name parameter.
    Storage Encryption The method that you want to use to store data. Valid values:
    • Encrypted (recommended): DBS uses AES-256, one of the advanced encryption standard ciphers, to encrypt the stored data.

      The server-side encryption feature is used in OSS. When you upload an object to a bucket for which server-side encryption is enabled, OSS encrypts and stores the object. When you download the encrypted object from OSS, OSS decrypts the object and returns the decrypted object to you. For more information, see Server-side encryption.

    • Non-encrypted: The backup data is not encrypted.
    OSS Bucket Name

    The name of the OSS bucket that you want to use to store data.

    This parameter is displayed only when you set the Backup Storage Type parameter to OSS For User.

  5. In the Edit Backup Objects step, find the database or table that you want to back up and add it to the Selected section. Then, click Next.
    Note DBS allows you to back up a single table, a single database, multiple databases, or an entire MySQL instance. If you back up an entire database, the permission data and stored procedures are also backed up.
  6. In the Configure Backup Time step, set the parameters that are described in the following table and click Next in the lower-right corner of the page.
    Parameter Description
    Full-scale Backup Frequency

    The frequency of the backup schedule. Select Periodic Backup or Single Backup as needed.

    Note If you select Periodic Backup, you must set the Full Data Backup Recurrence and Start At parameters.
    Full Data Backup Recurrence

    The days of the week on which DBS runs the backup schedule. Select at least one day of the week.

    Start At

    The start time of the backup, such as 01:00. We recommend that you set a time during off-peak hours.

    Note If a previous full data backup is not finished at the start time of the next backup, DBS skips the next backup.
    Incremental Backup Specifies whether to enable incremental backup.

    This parameter is displayed only when you set the Full-scale Backup Frequency parameter to Periodic Backup.

    Maximum Concurrent Threads for Full Data Backup

    The maximum number of concurrent threads available for a full data backup. You can set this parameter to adjust the backup speed. For example, reduce the number of backup threads to minimize the impact on the database.

    The maximum number of actual concurrent threads varies based on backup schedule specifications. For more information, see How do I change the maximum backup speed?

    Backup network speed limit

    The limit on the network bandwidth. You can set the limit based on your need. The default value of this parameter is 0, which indicates that the network bandwidth is unlimited.

  7. In the Edit Lifecycle step, configure the lifecycle for full backup data in the Configure Full Data Backup Lifecycle section.
    If you set the Incremental real-time backup parameter to Enable in Step 6, you must configure the lifecycle for incremental backup data. For more information about the lifecycle rules of backup data, see How do I manage the lifecycle rules of backup sets?.
  8. After the configurations are complete, click Precheck in the lower-right corner of the page.
  9. If the Precheck Passed message appears, click Start Task.
    Precheck
    Note When the status of the backup schedule changes to Running, the backup schedule takes effect.
    After data is backed up, you can view the backup schedule or restore the backup data. For more information, see View backup schedules and Restore the data of an ApsaraDB RDS for PostgreSQL instance across regions.

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 data across regions.
Restore data to a new instance across regions Restores the data of an ApsaraDB RDS instance to a new RDS instance that resides in a different region than the original 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.