Migrate data from one AnalyticDB for PostgreSQL instance to another when you need to upgrade versions (for example, V4.3 to V6.0), resize an instance, or switch resource types.
Migration transfers data once — it does not continuously synchronize. If writes occur on the source instance during migration, you must backfill that data afterward. To avoid this, pause write operations before you start.
Prerequisites
Before you begin, make sure that you have:
Source and destination instances in the same Alibaba Cloud account
Network connectivity between the two instances — deploy both in the same virtual private cloud (VPC), or use Cloud Enterprise Network (CEN) to connect VPCs in the same region. For setup instructions, see Use Basic Edition transit routers to connect VPCs in the same region
A whitelist configured on both instances to allow connections between them
Destination instance with compute nodes equal to or greater than the source instance — the same node count delivers the best migration speed when you use gpcopy
If migrating from V4.3 to V6.0: reviewed the compatibility check guide to identify unsupported features
Supported migration paths
The migration method available depends on the resource types of the source and destination instances.
| Source | Destination | Solution |
|---|---|---|
| Serverless | Serverless | Submit a ticket |
| Serverless | Elastic storage mode (V6.0) | Submit a ticket |
| Serverless | Elastic storage mode (V7.0) | Submit a ticket |
| Elastic storage mode (V6.0) | Serverless | Submit a ticket |
| Elastic storage mode (V6.0) | Elastic storage mode (V6.0) | Submit a ticket |
| Elastic storage mode (V6.0) | Elastic storage mode (V7.0) | Submit a ticket |
| Elastic storage mode (V7.0) | Elastic storage mode (V7.0) | Submit a ticket |
Migration from elastic storage mode (V7.0) to Serverless mode or elastic storage mode (V6.0) is not supported.
Migrate data
Follow these steps to prepare and run the migration.
Enable read-only mode on the source instance. This prevents writes during migration and removes the need to backfill data afterward.
Run a full migration. Use full migration rather than incremental to ensure data consistency.
Start the migration using the method for your instance types (see Supported migration paths).
Reset the whitelist after migration completes. Restore the whitelist on both instances to your production environment configuration.
After migration
After migration completes, AnalyticDB for PostgreSQL automatically runs the ANALYZE statement on the destination instance to collect statistics and generate an optimal execution plan. During this process, CPU workload on the coordinator node temporarily increases, proportional to the data volume migrated.