This topic describes how to migrate data from an AnalyticDB for PostgreSQL instance to another AnalyticDB for PostgreSQL instance.
Usage notes
Data can be migrated but cannot be synchronized. If new data is written during a data migration, you must backfill data after the data migration.
We recommend that you migrate data when write operations are paused. Otherwise, your service performance is compromised and the data migration slows down.
We strongly recommend that you enable the read-only mode when you migrate data.
We recommend that you use full migration.
Data migration imposes requirements on the network connectivity. A smooth connection between the source and destination instances facilitates fast data migration. We recommend that you deploy the source and destination instances in the same virtual private cloud (VPC) or use Cloud Enterprise Network (CEN) to connect VPCs in the same region for instances that reside in different VPCs. For more information, see Use Basic Edition transit routers to connect VPCs in the same region.
After data migration, the AnalyticDB for PostgreSQL instance executes the ANALYZE statement to collect statistics to generate an optimal execution plan. When the ANALYZE statement is executed, CPU workloads on the coordinator node temporarily increase based on the data volume.
The number of compute nodes in the destination AnalyticDB for PostgreSQL instance must be greater than or equal to the number of compute nodes in the source instance. If you use gpcopy to migrate data, the same number of compute nodes delivers the optimal migration speed.
Before data migration, you must configure a whitelist to establish a connection between the source and destination instances. After data migration, set the whitelist to the production environment configuration.
Before you migrate data from an AnalyticDB for PostgreSQL V4.3 instance to an AnalyticDB for PostgreSQL V6.0 instance, check whether the source instance uses features that are incompatible with the destination instance. For more information, see Check for incompatibility between AnalyticDB for PostgreSQL V4.3 and V6.0.
Migration methods
Resource type of the source instance | Resource type of the destination instance | Solution |
Serverless | Serverless | |
Elastic storage mode (V6.0) | ||
Elastic storage mode (V7.0) | ||
Elastic storage mode (V6.0) | Serverless | |
Elastic storage mode (V6.0) | ||
Elastic storage mode (V7.0) | ||
Elastic storage mode (V7.0) | Elastic storage mode (V7.0) |
You cannot migrate data between AnalyticDB for PostgreSQL instances from elastic storage mode (V7.0) to Serverless mode or elastic storage mode (V6.0).