Promo Center

50% off for new user

Direct Mail-46% off

Learn More

Migrate an ApsaraDB RDS for PostgreSQL instance across zones

Updated at: 2025-01-23 12:09
important

This topic contains important information on necessary precautions. We recommend that you read this topic carefully before proceeding.

This topic describes how to migrate an ApsaraDB RDS for PostgreSQL instance across zones in the same region. After your RDS instance is migrated, its attributes, configuration, and endpoints remain unchanged. The time that is required to complete the migration varies based on the amount of the data that needs to be migrated. In most cases, the migration requires a few hours.

Prerequisites

  • The region in which your RDS instance resides consists of multiple zones. For more information, see Regions and zones.

  • Your RDS instance is a primary RDS instance, and no read-only RDS instances are attached to the RDS instance.

  • Your RDS instance is in the Running state.

Note

You cannot migrate an RDS instance that runs RDS Cluster Edition across zones.

Limits

  • If your database system uses local disks, you can migrate only the primary RDS instance across zones in the same region.

  • You cannot migrate a serverless RDS instance to another zone. For more information, see Overview.

Billing rules

  • You are not charged for the cross-zone migration. This applies even if you migrate your RDS instance from one zone to multiple zones.

  • If your RDS instance uses standard SSDs, the storage type of the RDS instance is automatically upgraded from standard SSD to PL1 ESSD during the migration. After the upgrade, the fees for storage resources remain unchanged.

Impacts

  • During the migration, your database service may be unavailable for a short period of time. Make sure that your application is configured to automatically reconnect to your RDS instance.

  • The cross-zone migration causes changes to the virtual IP addresses (VIPs) of your RDS instance. We recommend that you use an endpoint rather than an IP address of your RDS instance to connect your application to your RDS instance.

  • If an instance switchover occurs during the cross-zone migration, the VIP of your RDS instance changes. We recommend that you use an endpoint rather than an IP address of your RDS instance to connect to the RDS instance and clear the DNS cache of your client in a timely manner. If the client of your application runs on a Java virtual machine (JVM), we recommend that you set the time-to-live (TTL) in the JVM configuration to 60 seconds or less to ensure that your application can obtain the new VIP of the RDS instance after the migration.

    Note

    For more information about how to set the TTL in the JVM configuration, see Class InetAddress.

  • After the cross-zone migration is complete, you must restart the corresponding running task in DTS.

  • If the resource inventory in the zone to which you want to migrate the instance is insufficient, the migration may fail.

  • ApsaraDB RDS for PostgreSQL instances that use standard SSDs are no longer available for purchase. If your RDS instance uses standard SSDs, the storage type of the RDS instance is automatically upgraded from standard SSD to PL1 ESSD during the cross-zone migration. For more information, see [EOS/Discontinuation] End of sale for the standard SSD storage type for specific database engines in ApsaraDB RDS from July 01, 2022.

Migration scenarios

Migration type

Scenario

Migration type

Scenario

Migration from one zone to another zone

The original zone in which your RDS instance resides cannot ensure service performance due to issues such as heavy loads.

Migration from one zone to multiple zones

Deploy the primary and secondary RDS instances in different zones to implement cross-zone disaster recovery. This way, your database system can withstand data center failures.

Note

If your database system contains primary and secondary RDS instances, we recommend that you select the multi-zone deployment method to implement cross-zone disaster recovery.

Migration from multiple zones to one zone

You want to use specific features that are supported only when the single-zone deployment method is used.

Procedure

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

  2. In the Basic Information section, click Migrate Data Across Zones.

  3. In the dialog box that appears, select the primary zone, secondary zone, and vSwitches, and click Yes.

    Parameters

    Parameter

    Description

    Parameter

    Description

    Configure Primary Zone

    Select destination zones for the primary and secondary RDS instances.

    • If your RDS instance uses local disks, you can migrate only the primary instance across zones in the same region. The secondary instance cannot be migrated across zones.

    • If the RDS instance uses cloud disks, you can migrate the primary and secondary instance across zones separately or at the same time. Examples:

      • The primary RDS instance resides in Singapore Zone A and the secondary RDS instance resides in Singapore Zone B. You can migrate the primary RDS instance to Singapore Zone C and the secondary RDS instance to Singapore Zone D.

      • The primary RDS instance resides in Singapore Zone A and the secondary RDS instance resides in Singapore Zone B. You can retain the primary RDS instance in Singapore Zone A and migrate only the secondary RDS instance to Singapore Zone C.

      Note

      If you separately migrate the primary or secondary RDS instance across zones, you need only to configure the zone to which you want to migrate the instance.

    Configure Secondary Zone

    vSwitch in Primary Zone

    Select vSwitches in the destination zones for the primary and secondary RDS instances. If no vSwitches are available in the destination zones, create vSwitches. For more information, see Create and manage a vSwitch.

    vSwitch in Secondary Zone

    Switching Time

    • Switch Now: The switchover is immediately performed.

    • Switchover Within Maintenance Window: The switchover is performed during the specified maintenance window. For more information, see Configure a maintenance window.

    • Take Effect at Specified Time Range: The switchover is performed at a specified point in time.

    After you click Yes, the system starts to replicate the data of your RDS instance to the destination zones. This process does not interrupt the workloads on your RDS instance. After the data is replicated, the system switches your workloads based on the time that is specified by the Switching Time parameter. You can set the Switching Time parameter to Switch Now, Switchover Within Maintenance Window, or Take Effect at Specified Time Range.

    Warning

    The instance is transiently disconnected during the switchover. Make sure that your application is configured to automatically reconnect to your RDS instance.

    If the DNS records cached on the database client are not immediately updated after the migration, some workloads may be switched over to the destination zones 10 minutes later. As a result, the RDS instance encounters another transient connection. If the database client runs on a JVM, we recommend that you set the TTL in the JVM configuration to 60 seconds or less. In this case, if the virtual IP address that is bound to the in-use endpoint of the RDS instance changes, your application can query the related DNS records again to obtain the new virtual IP address. Then, your application can connect to the new virtual IP address. For more information, see the Impacts.

Related API operation

API

Description

API

Description

MigrateToOtherZone

Migrates an RDS instance across zones.

  • On this page (1, T)
  • Prerequisites
  • Limits
  • Billing rules
  • Impacts
  • Migration scenarios
  • Procedure
  • Related API operation
Feedback
phone Contact Us

Chat now with Alibaba Cloud Customer Service to assist you in finding the right products and services to meet your needs.

alicare alicarealicarealicare