This topic describes how to migrate schemas, full data, and incremental data between ApsaraDB RDS for PostgreSQL instances by using Data Transmission Service (DTS). When you migrate data between ApsaraDB RDS for PostgreSQL instances, you can select all the supported migration types to ensure service continuity.
Prerequisites
- The source and destination ApsaraDB RDS for PostgreSQL instances are created. For more information, see Create an ApsaraDB RDS for PostgreSQL instance.
Note To ensure compatibility, the database engine version of the destination ApsaraDB RDS for PostgreSQL instance is the same as or later than the database engine version of the source ApsaraDB RDS for PostgreSQL instance.
If the version of the destination database is earlier than the version of the source database, database compatibility issues may occur.
- The available storage space of the destination ApsaraDB RDS for PostgreSQL instance is larger than the total size of data in the source ApsaraDB RDS for PostgreSQL instance.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Other limits |
|
Special cases |
During data migration, do not modify the endpoint or zone of the source ApsaraDB RDS for PostgreSQL instance. Otherwise, the data migration task fails. |
Migration types
- Schema migration
DTS migrates the schemas of required objects from the source database to the destination database.
- Full data migration
DTS migrates historical data of required objects from the source database to the destination database.
- Incremental data migration
After full data migration is complete, DTS migrates incremental data from the source database to the destination database. Incremental data migration allows you to ensure service continuity when you migrate data between self-managed databases.
SQL operations that can be incrementally migrated
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE |
Permissions required for database accounts
Database | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Source ApsaraDB RDS for PostgreSQL instance | USAGE permission on the pg_catalog schema | SELECT permission on the objects to be migrated | Permissions of a privileged account. The account must be the owner of the database.
Note If the version of the source ApsaraDB RDS for PostgreSQL instance is 9.4 and you migrate
only DML operations, only the REPLICATION permission is required for the database
account.
|
Destination ApsaraDB RDS for PostgreSQL instance | CREATE and USAGE permissions on the objects to be migrated | Permissions of the schema owner |
For more information about how to create accounts and grant permissions to accounts for an ApsaraDB RDS for PostgreSQL instance, see Create an account on an ApsaraDB RDS for PostgreSQL instance and Create a database on an ApsaraDB RDS for PostgreSQL instance.