This topic describes how to migrate schemas, full data, and incremental data between ApsaraDB RDS for PostgreSQL instances with no downtime by using Data Transmission Service (DTS).
Prerequisites
- The source and destination ApsaraDB RDS for PostgreSQL instances are created. For more information, see Create an ApsaraDB RDS for PostgreSQL instance.
Note For compatibility purposes, we recommend that the source ApsaraDB RDS for PostgreSQL instance runs a database engine version that is earlier than or the same as the database engine version that is run on the destination ApsaraDB RDS for PostgreSQL instance.
If the source ApsaraDB RDS for PostgreSQL instance runs a later database engine version than the destination ApsaraDB RDS for PostgreSQL instance, compatibility issues may occur.
- The available storage of the destination ApsaraDB RDS for PostgreSQL instance is greater than the used storage of the source ApsaraDB RDS for PostgreSQL instance.
Precautions
Type | Description |
---|---|
Limits on the source database |
|
Other limits |
|
Special cases |
|
Migration types
- Schema migration
DTS migrates the schemas of the required objects from the source database to the destination database.
- Full data migration
DTS migrates historical data of the required objects from the source database to the destination database.
- Incremental data migration
After full data migration is completed, 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 support incremental data migration
Operation type | SQL statement |
---|---|
DML | INSERT, UPDATE, and DELETE |
Permissions that are required for database accounts
Instance | Schema migration | Full data migration | Incremental data migration |
---|---|---|---|
Source ApsaraDB RDS for PostgreSQL instance | The USAGE permission on the pg_catalog schema | The SELECT permission on the objects that you want to migrate | The privileged account
Note If the source ApsaraDB RDS for PostgreSQL instance runs PostgreSQL 9.4 and you want
to migrate only the incremental data that is generated by DML operations, the database
account that you use needs only to have the REPLICATION permission.
|
Destination ApsaraDB RDS for PostgreSQL instance | The CREATE and USAGE permissions on the migrated objects | The permissions of the owner to which the schema belongs |
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.