Data Transmission Service (DTS) lets you migrate data from an Amazon RDS for PostgreSQL instance to an ApsaraDB RDS for PostgreSQL instance with minimal downtime. DTS supports schema migration, full data migration, and incremental data migration. Selecting all three types keeps the source database operational throughout the migration, allowing a controlled cutover.
Prerequisites
Before you begin, make sure that you have:
An Amazon RDS for PostgreSQL instance running version 10.4 or later
Public accessibility enabled on the Amazon RDS instance (set to Yes), so DTS can reach it over the Internet
rds.logical_replicationset to1on the Amazon RDS instance, so DTS can read incremental dataAn ApsaraDB RDS for PostgreSQL instance already created. For instructions, see Create an ApsaraDB RDS for PostgreSQL instance
Enough free storage on the ApsaraDB RDS instance to hold all data from the source instance
Use the same major PostgreSQL version on both the source and destination. If the versions differ, create a pay-as-you-go instance to verify compatibility before committing to the migration.
Limitations
Functional limitations
| Limitation | Impact | Action |
|---|---|---|
| DML only for incremental migration | DTS migrates only INSERT, DELETE, and UPDATE operations. DDL operations are not captured. | Do not run DDL on source objects before incremental migration starts. Affected objects may fail to migrate. |
| Single database per task | Each migration task covers one database. | Create a separate task for each database you want to migrate. |
| Primary key or unique constraint required | Objects without a PRIMARY KEY or UNIQUE constraint (with all unique fields) may produce duplicate records or cause the task to fail. | Add a primary key or unique constraint to all objects before migration. |
| C-language functions excluded | DTS does not migrate PostgreSQL functions written in C. | Manually recreate these functions on the destination after migration. |
Operational considerations
| Situation | Behavior | Action |
|---|---|---|
| Replication slot management | DTS creates a replication slot prefixed with dts_sync_ and clears historical slot data every 90 minutes to limit storage growth. | No action required during normal operation. |
| Task released or failed | DTS automatically removes the replication slot. | No manual cleanup needed. |
| Primary/secondary switchover on source | The DTS task fails and may not resume automatically. The replication slot is not automatically cleared on the new primary. | Log in to the secondary database and manually delete the replication slot (see the screenshot below). |
| Resuming a failed task | If DTS resumes the task automatically, it continues writing source data to the destination. | Stop or release the task before switching workloads to the destination, or destination data may be overwritten. |
| Performance impact during full migration | Full data migration consumes read and write resources on both databases. | Run the migration during off-peak hours when CPU utilization on both instances is below 30%. |

Billing
| Migration type | Task configuration fee | Internet traffic fee |
|---|---|---|
| Schema migration and full data migration | Free | Charged only when data is migrated from Alibaba Cloud over the Internet. See Billing overview. |
| Incremental data migration | Charged. See Billing overview. | — |
Migration types
Schema migration — DTS migrates object schemas to the destination: tables, triggers, views, sequences, functions, user-defined types, rules, domains, operations, and aggregates. Functions written in C are excluded.
Full data migration — DTS migrates all existing data from the source to the destination.
Incremental data migration — After full data migration completes, DTS continuously captures and applies changes from the source. This keeps the destination in sync while your applications remain connected to the source, allowing a controlled cutover.
Required permissions
| Database | Schema migration | Full data migration | Incremental data migration |
|---|---|---|---|
| Amazon RDS for PostgreSQL | USAGE on pg_catalog | SELECT on objects to be migrated | rds_superuser |
| ApsaraDB RDS for PostgreSQL | CREATE and USAGE on objects to be migrated | Schema owner permissions | Schema owner permissions |
Migration order
DTS migrates objects in the following order to avoid dependency failures:
Schemas of tables, views, sequences, functions, user-defined types, rules, domains, operations, and aggregates
Full data migration
Schemas of triggers and foreign keys
Incremental data migration
Do not run DDL operations on source objects before incremental migration starts. Objects affected by DDL changes may fail to migrate.
Add DTS server IP addresses to the Amazon RDS security group
Before creating the migration task, allow DTS servers to reach the Amazon RDS instance.
Log in to the Amazon RDS Management Console and navigate to the region where the instance resides.
In the left navigation pane, click Databases, then click the database identifier.

In the Security group rules section, click the name of the security group that contains the existing inbound rule.

On the Security Groups page, click the Inbound tab, then click Edit. Add the CIDR blocks of DTS servers in the same region as your destination ApsaraDB RDS instance. For the list of DTS server CIDR blocks by region, see Add the CIDR blocks of DTS servers.
Add only the CIDR blocks for the region where your destination database resides. For example, if the destination is in China (Hangzhou), add only the China (Hangzhou) DTS CIDR blocks. You can add all required CIDR blocks in a single edit.

Create the migration task
In the new DTS console
Go to the Data Migration page.
DTS console: Log in to the DTS console. In the left navigation pane, click Data Migration. In the upper-left corner, select the region where the migration instance will reside.
DMS console: Log in to the DMS console. In the top navigation bar, go to Data + AI > DTS (DTS) > Data Migration. From the drop-down list next to Data Migration Tasks, select the target region. > Note: The DMS console layout may vary. See Simple mode and Customize the layout and style of the DMS console.
Click Create Task.
Configure the source and destination databases.
WarningRead the Limits displayed at the top of the configuration page before proceeding. Skipping this step may cause task failures or data inconsistencies.
Source database
Parameter Description Task Name A name for the DTS task. DTS generates one automatically; update it to something descriptive. Uniqueness is not required. Select a DMS database instance Select an existing registered instance, or leave blank to configure connection details manually. To register a database instance, see Register an Alibaba Cloud database instance or Register a database hosted on a third-party cloud service or a self-managed database. Database Type Select PostgreSQL. Access Method Select Public IP Address. Instance Region The region where the Amazon RDS instance resides. If the region is not listed, select the geographically closest one. Domain Name or IP The endpoint of the Amazon RDS instance. Find this on the instance's basic information page. Port Number The PostgreSQL service port. Default: 5432. Database Name The name of the source database. Database Account The database account. See Required permissions for the minimum permissions needed. Database Password The password for the database account. Encryption Select Non-encrypted or SSL-encrypted. For SSL, upload the CA Certificate and, if using client certificate authentication, the Client Certificate, Private Key of Client Certificate, and Private Key Password of Client Certificate. For more information, see SSL encryption. Destination database
Parameter Description Select a DMS database instance Select an existing registered instance, or configure connection details manually. Database Type Select PostgreSQL. Access Method Select Alibaba Cloud Instance. Instance Region The region where the ApsaraDB RDS instance resides. Instance ID The ID of the ApsaraDB RDS for PostgreSQL instance. Database Name The destination database name. It can differ from the source database name. Create the database in advance. See Create a database. Database Account The database account. See Required permissions. Database Password The password for the database account. Encryption Select Non-encrypted or SSL-encrypted as needed. Click Test Connectivity and Proceed, then click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.
DTS server CIDR blocks must be added to the security settings of the source and destination databases before this step. See Add the CIDR blocks of DTS servers.
Configure the objects to migrate. On the Configure Objects page, set the following parameters:
Renaming an object with object name mapping may cause dependent objects to fail migration.
Parameter Description Migration Types Select Schema Migration and Incremental Migration. Selecting all supported types is strongly recommended. Processing Mode of Conflicting Tables Precheck and Report Errors (default): fails the precheck if tables with identical names exist in the destination. Use object name mapping to rename conflicting objects. Ignore Errors and Proceed: skips the precheck. During full migration, conflicting records are skipped; during incremental migration, they are overwritten. Use with caution — this may cause data inconsistencies. Capitalization of Object Names in Destination Instance Controls the case of database, table, and column names in the destination. Default: DTS default policy. See Specify the capitalization of object names in the destination instance. Source Objects Select objects from the Source Objects list and click
to move them to Selected Objects. You can select columns, tables, or schemas. Selecting tables or columns excludes other object types such as views, triggers, and stored procedures.Selected Objects To rename a single object, right-click it in the Selected Objects list. To rename multiple objects at once, click Batch Edit. See Map object names. To filter rows with a WHERE condition, right-click a table and specify the condition. See Specify filter conditions. Click Next: Advanced Settings and configure optional parameters.
Parameter Description Dedicated Cluster for Task Scheduling By default, DTS uses a shared cluster. To improve task stability, purchase a dedicated cluster. See What is a DTS dedicated cluster? Retry Time for Failed Connections How long DTS retries after a connection failure. Valid values: 10–1,440 minutes. Default: 720 minutes. Set to at least 30 minutes. If multiple tasks share the same database, the most recently configured value takes precedence. Retry Time for Other Issues How long DTS retries after DDL or DML failures. Valid values: 1–1,440 minutes. Default: 10 minutes. Must be less than Retry Time for Failed Connections. Enable Throttling for Full Data Migration Limits read/write throughput during full migration. Configure Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s). Available only when Full Data Migration is selected. Enable Throttling for Incremental Data Migration Limits throughput during incremental migration. Configure RPS of Incremental Data Migration and Data migration speed for incremental migration (MB/s). Available only when Incremental Data Migration is selected. Environment Tag Optional tags to identify the instance. Configure ETL Enable the extract, transform, and load (ETL) feature to process data during migration. See What is ETL? and Configure ETL in a data migration or data synchronization task. Monitoring and Alerting Configure alerts for task failures or high migration latency. When enabled, specify the alert threshold and notification settings. See Configure monitoring and alerting. Click Next Step: Data Verification to configure data verification. See Configure a data verification task.
Click Next: Save Task Settings and Precheck. DTS runs a precheck before starting the task. If the precheck fails:
Click View Details next to each failed item, resolve the issue, then click Precheck Again.
If an alert item can be safely ignored, click Confirm Alert Details > Ignore > OK, then click Precheck Again. Ignoring alerts may cause data inconsistencies.
To preview the API parameters for this configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.
Once Success Rate reaches 100%, click Next: Purchase Instance.
On the Purchase Instance page, configure the instance.
Parameter Description Resource Group The resource group for the migration instance. Default: default resource group. See What is Resource Management? Instance Class The instance class determines migration speed. See Instance classes of data migration instances. Select Data Transmission Service (Pay-as-you-go) Service Terms, then click Buy and Start > OK. The migration task starts. Track its progress on the Data Migration page.
In the old DTS console
Log in to the DTS console.
If you are redirected to the DMS console, click the
icon in the
to return to the previous DTS console version.In the left navigation pane, click Data Migration.
At the top of the Migration Tasks page, select the region where the destination instance resides.
In the upper-right corner, click Create Migration Task.
Configure the source and destination databases.
Section Parameter Description N/A Task Name A descriptive name for the task. Uniqueness is not required. Source Database Instance Type Select User-Created Database with Public IP Address. Instance Region Not required when User-Created Database with Public IP Address is selected. Database Type Select PostgreSQL. Hostname or IP Address The endpoint of the Amazon RDS instance. Find this on the instance's basic information page. 
Port Number Default: 5432. Database Name The source database name. Database Account The database account. See Required permissions. Database Password The account password. Click Test Connectivity after entering the password to validate the configuration. Destination Database Instance Type Select RDS Instance. Instance Region The region where the ApsaraDB RDS instance resides. RDS Instance ID The ID of the ApsaraDB RDS for PostgreSQL instance. Database Name The destination database name. It can differ from the source. Create the database in advance. See Create a database. Database Account The database account. See Required permissions. Database Password The account password. Click Test Connectivity to validate. 
Click Set Whitelist and Next. DTS automatically adds its server CIDR blocks to the IP whitelist of Alibaba Cloud database instances and to the security group rules of ECS-hosted databases. For third-party or on-premises databases, add the CIDR blocks manually. See Add the CIDR blocks of DTS servers.
WarningAdding DTS server CIDR blocks to a database whitelist or ECS security group introduces security exposure. Before proceeding, take protective measures such as using strong credentials, restricting exposed ports, enabling API call authentication, auditing whitelist rules regularly, and connecting through Express Connect, VPN Gateway, or Smart Access Gateway where possible.
Select migration types and objects.
Setting Description Migration types Select Schema Migration, Full Data Migration, and Incremental Data Migration. Objects to migrate Select objects from Available and click
to move them to Selected. You can select columns, tables, or schemas. To rename objects in the destination, use the object name mapping feature. See Object name mapping.Retry time for failed connections How long DTS retries on connection failure. Default: 12 hours. 
Click Precheck. Resolve any failed items by clicking the
icon, fixing the underlying issue, and running the precheck again. You can also ignore non-critical items and rerun.After the precheck passes, click Next.
In the Confirm Settings dialog box, select a Channel Specification and accept Data Transmission Service (Pay-As-You-Go) Service Terms.
Click Buy and Start.
Cut over to the destination instance
Incremental data migration does not stop automatically. Cut over at a time that minimizes disruption — off-peak hours are recommended.
On the Data Migration page, wait until the task status shows Incremental Data Migration and The migration task is not delayed.
Stop all writes to the source database and wait for the incremental migration latency to drop to The migration task is not delayed again.

Manually stop the migration task.
Update your application connection strings to point to the ApsaraDB RDS for PostgreSQL instance.Create a database