ApsaraDB RDS for PostgreSQL provides the cross-region backup feature (geo-redundancy), which automatically backs up data to another region. This feature can be used for regulatory compliance or disaster recovery scenarios.
For information about the default backup feature of PostgreSQL, see Back up an ApsaraDB RDS for PostgreSQL instance.
For information about MySQL cross-region backup, see MySQL cross-region backup.
For information about SQL Server cross-region backup, see SQL Server cross-region backup.
Differences between cross-region backups and default backups
Item | Cross-region backup | Default backup |
Enabled by Default | By default, the feature is disabled. You need to manually enable it. | By default, the feature is enabled. |
Backup storage | Backup files are stored in another region. | Backup files are stored in the region where the instance resides. |
Backup restoration | Data can only be restored to a new instance in the destination region. | Data can be restored to:
|
Backup retention period | Independent of the instance. After the instance is released, backups are still retained according to the specified retention period. | By default, backups are retained for only 7 days after the instance is released. |
Prerequisites
The RDS PostgreSQL instance must meet the following conditions:
Premium Local SSDs: PostgreSQL 9.4, 10 (High-availability Edition)
Cloud disks: PostgreSQL 10 or later (Serverless instances are not supported)
If you are using the RDS backup service for the first time, you need to use your Alibaba Cloud account to complete the Data Disaster Recovery service-linked role (AliyunServiceRoleForDBS) authorization.
The instance is not using a new general-purpose instance type.
NoteNew general-purpose instance types provide better elasticity and higher instance performance, improving the speed of instance creation and specification changes. However, current adaptation is incomplete, and cross-region backup is not yet supported.
For RDS PostgreSQL instances with disk encryption enabled, before enabling cross-region backup, you need to activate your Alibaba Cloud account information in the destination region. For activation methods, see FAQ.
Billing rules
The following fees are generated when you perform cross-region backups for PostgreSQL instances through the RDS console:
Cross-region storage fee: USD 0.0002 per GB-hour.
Network traffic fee: For billing details, see Network traffic fees.
If you have a large amount of data, we recommend using DBS network plans to offset network fees.
Usage notes
Cross-region backup does not affect default backup. Both can exist simultaneously (local backups are copied to another region).
Cross-region backup is triggered after the default backup is completed, meaning the default backup is dumped to the cross-region backup storage device.
When enabling cross-region backup, if there are no valid backup sets in the last 24 hours, a backup of the secondary database will be triggered.
Supported backup links and regions
Due to network reasons, the cross-region backup feature supports a limited number of regions, as detailed below:
Supported backup links | Data backups between the Chinese mainland, China (Hong Kong), and regions outside China are supported, and the backup destination region must be different from the source region. |
Supported regions |
|
Enable the cross-region backup feature
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.
Find the target instance and choose
in the Actions column.NoteYou can also go to the target instance, find the Backup and Restoration page, click the Backup Settings tab, locate the Cross-region Backup Settings option, and then click Edit.
If the Cross-region Backup Settings option is not displayed, confirm whether your instance meets the prerequisites.
Configure the following parameters, select the billing and compliance statements, and click OK.
Parameter
Description
Cross-region Backup
The main switch for cross-region backup. Select Enable.
Backup Region
The region currently available for storing backups. Local backup files will be automatically copied to this region.
Cross-region Backup Retention Policy
Cross-region backup files can be retained for 7 to 1,825 days, which is up to 5 years.
NoteEven if the RDS instance expires or is released, the retention period of the cross-region backup files is not affected. You can view unexpired backup files in the
of the target instance.Cross-region Log Backup Status
The switch for cross-region log backup. When enabled, local log backup files are automatically copied to OSS in the destination region.
ImportantIf the cross-region backup feature fails to enable for an RDS PostgreSQL cloud disk instance (with disk encryption enabled), it may be because your Alibaba Cloud account information has not been activated in the destination region. See FAQ for instructions on how to resolve this issue before enabling it again.
Modify cross-region backup settings
You can modify cross-region backup policies, such as the destination region for storing backups and the retention period for cross-region backup sets.
Log on to the ApsaraDB RDS console, click Backup Management in the navigation pane on the left, and then select a region in the top navigation bar.
On the
tab, find the target instance and click Settings in the rightmost column to modify the cross-region backup settings.NoteIf the instance has been released, you can only modify the retention period. Other options cannot be modified.
Disable the cross-region backup feature
You can disable the cross-region backup feature at any time as needed.
Log on to the ApsaraDB RDS console, click Backup Management in the navigation pane on the left, and then select a region in the top navigation bar.
On the
tab, find the target instance and click Settings in the rightmost column.Change Cross-region Backup Status to Disabled and change Cross-region Retention Period to 7 days.
NoteAfter disabling cross-region backup, no new backups will be generated, and you will no longer be charged for traffic fees. However, old backups will not be deleted immediately. According to the backup policy, backups will be retained for at least 7 days. You can set the cross-region backup retention period to 7 days, and after 7 days, all backup files will be automatically purged, and you will no longer be charged for cross-region backup fees.
Download cross-region backup sets
After completing cross-region backup in the RDS console, you can download the cross-region stored backup data.
Log on to the ApsaraDB RDS console, click Backup Management in the navigation pane on the left, and then select a region in the top navigation bar.
On the
tab, find the target instance and click the instance ID.On the Data Backup and Log Backup tabs, click Download in the row of the backup to download full backup sets and incremental backup data respectively.
Read and select the relevant agreement, and click Download.
NoteWhen downloading backup files, internal network traffic is free, while external network traffic is charged. For pricing details, see Network traffic fees.
References
If you have completed cross-region backup, you can restore data across regions to a new instance or an existing instance in the destination region. For more information, see Restore data across regions.
You can also perform cross-region backup operations directly through API:
CheckCreateDdrDBInstance - Precheck whether an instance can be restored across regions
CreateDdrInstance - Restore data across regions to a new instance
ModifyInstanceCrossBackupPolicy - Modify RDS cross-region backup settings
DescribeInstanceCrossBackupPolicy - Query cross-region backup settings
DescribeCrossBackupMetaList - Query database and table information of instance cross-region backups
DescribeCrossRegionBackups - Query the list of cross-region data backup files for an RDS instance
DescribeCrossRegionLogBackupFiles - Query the list of cross-region log backup files
DescribeAvailableCrossRegion - Query available destination regions for cross-region backup
DescribeCrossRegionBackupDBInstance - Query instances with cross-region backup enabled