You can use Data Transmission Service (DTS) to synchronize data between data sources in real time. This feature applies to the following scenarios: active geo-redundancy, geo-disaster recovery, zone-disaster recovery, cross-border data synchronization, cloud BI systems, and real-time data warehousing. This topic describes the database types, synchronization types, and synchronization topologies that are supported by DTS.

Note
  • The data synchronization feature can achieve data migration in specific scenarios. However, data synchronization and data migration differ in scenarios, supported databases, features, and billing. For more information, see What are the differences between data migration and data synchronization?
  • DTS can read the instances that are created in an ApsaraDB for MyBase cluster. The topics listed in the following table are also applicable to synchronization scenarios for ApsaraDB for MyBase clusters. For example, you can synchronize data from a self-managed MySQL database to an ApsaraDB RDS for MySQL instance that is created in an ApsaraDB for MyBase cluster.

Synchronization types

Synchronization type Description
Schema synchronization

DTS synchronizes the schemas of the required objects from the source database to the destination database. Tables, views, triggers, and stored procedures can be synchronized.

Note Before you configure a data synchronization task, check whether schema synchronization is supported. If schema synchronization is not supported, you must create a destination database and tables based on the schemas of the required objects in the source database.
Full data synchronization

DTS synchronizes historical data of the required objects from the source database to the destination database. Historical data is the basis for subsequent incremental synchronization.

To simplify data synchronization, we recommend that you select both Schema Synchronization and Full Data Synchronization when you configure a data synchronization task.

Incremental data synchronization Incremental data synchronization is supported by default. DTS synchronizes incremental data generated in the source database to the destination database in real time.

Synchronization topologies

For more information, see Synchronization topologies.

Database types, synchronization types, and synchronization topologies

Note

A self-managed MySQL or Redis database can be one of the following types:

  • Self-managed database that is hosted on Elastic Compute Service (ECS)
  • Self-managed database that is connected over Express Connect, VPN Gateway, or Smart Access Gateway
  • Self-managed database that has no public IP address or port number (connected over Database Gateway)
  • Self-managed database that is connected over Cloud Enterprise Network (CEN)
Source database Destination database Synchronization type Synchronization topology
  • Self-managed MySQL database

    Version 5.1, 5.5, 5.6, 5.7, or 8.0

  • ApsaraDB RDS for MySQL

    All versions

Self-managed MySQL database

Version 5.1, 5.5, 5.6, 5.7, or 8.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Two-way synchronization

ApsaraDB RDS for MySQL

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Two-way synchronization

PolarDB for MySQL

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

AnalyticDB for MySQL

Version 2.0 or 3.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

AnalyticDB for PostgreSQL

Version 4.3 or 6.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Elasticsearch

Version 5.5, 6.3, 6.7, 7.4, or 7.10

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

MaxCompute

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Self-managed Kafka cluster

Version 0.10.1.0 to 2.7.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization
DRDS

All versions

Note The databases in the DRDS instance must be created based on ApsaraDB RDS for MySQL instances. DTS does not support DRDS databases that are created based on PolarDB for MySQL clusters.
DRDS

All versions

Note The databases in the DRDS instance must be created based on ApsaraDB RDS for MySQL instances. DTS does not support DRDS databases that are created based on PolarDB for MySQL clusters.
Full data synchronization

Incremental data synchronization

One-way synchronization

AnalyticDB for MySQL

Version 2.0 or 3.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

AnalyticDB for PostgreSQL

Version 4.3 or 6.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

PolarDB for MySQL

All versions

Self-managed MySQL database

Version 5.1, 5.5, 5.6, 5.7, or 8.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

ApsaraDB RDS for MySQL

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

PolarDB for MySQL

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

AnalyticDB for MySQL

Version 2.0 or 3.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Self-managed Kafka cluster

Version 0.10.1.0 to 2.7.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Elasticsearch

Version 5.5, 6.3, 6.7, 7.4, or 7.10

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

MaxCompute

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

PolarDB-O

All versions

PolarDB-O

All versions

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization

Self-managed Kafka cluster

Version 0.10.1.0 to 2.7.0

Incremental data synchronization

One-way synchronization
  • ApsaraDB RDS for PostgreSQL

    Version 9.4, 10, 11, 12, or 13

  • Self-managed PostgreSQL database

    Version 9.4.8 or later, 9.5, 9.6, 10.x, 11.x, 12, or 13

AnalyticDB for PostgreSQL

Version 4.3 or 6.0

Schema synchronization

Full data synchronization

Incremental data synchronization

One-way synchronization
  • Self-managed Redis database (standalone or cluster architecture)

    Version 2.8, 3.0, 3.2, 4.0, 5.0, or 6.0

  • ApsaraDB for Redis instance (cluster, standard, or read/write splitting architecture)

    Community Edition 4.0, 5.0, or 6.0

  • ApsaraDB for Redis Enhanced Edition instance (cluster, standard, or read/write splitting architecture)

    Version 5.0

Note
  • The disk type of the source ApsaraDB for Redis instance must be local disk rather than cloud disk.
  • The source ApsaraDB for Redis instance cannot be a storage-optimized instance.
  • To synchronize data between ApsaraDB for Redis instances of different accounts, note that the source and destination instances must be deployed in the cluster or standard architecture. In this scenario, the read/write splitting architecture is not supported.
  • Self-managed Redis database (standalone or cluster architecture)

    Version 2.8, 3.0, 3.2, 4.0, 5.0, or 6.0

  • ApsaraDB for Redis instance (cluster, standard, or read/write splitting architecture)

    Community Edition 4.0, 5.0, or 6.0

  • ApsaraDB for Redis Enhanced Edition instance (cluster, standard, or read/write splitting architecture)

    Version 5.0

Note The disk type of the destination ApsaraDB for Redis instance must be local disk rather than cloud disk.

Full data synchronization

Incremental data synchronization

Note Redis is a NoSQL database that does not require schema synchronization.

One-way synchronization

Two-way synchronization
Note Only ApsaraDB for Redis Enhanced Edition instances (version 5.0) support two-way synchronization.

References

Synchronization scenario Reference
Synchronize data between MySQL databases Configure two-way data synchronization between ApsaraDB RDS for MySQL instances
Configure one-way data synchronization between ApsaraDB RDS for MySQL instances
Synchronize data from a self-managed MySQL database hosted on ECS to an ApsaraDB RDS for MySQL instance
Synchronize data from a self-managed MySQL database connected over Express Connect, VPN Gateway, or Smart Access Gateway to an ApsaraDB RDS for MySQL instance
Synchronize data from an ApsaraDB RDS for MySQL instance to a self-managed MySQL database connected over Express Connect, VPN Gateway, or Smart Access Gateway
Synchronize data between ApsaraDB RDS for MySQL instances that belong to different Alibaba Cloud accounts
Synchronize data from a MySQL database to a different type of database Synchronize data from an ApsaraDB RDS for MySQL instance to a PolarDB for MySQL cluster
Synchronize data from an ApsaraDB RDS for MySQL instance to an AnalyticDB for MySQL cluster
Synchronize data from an ApsaraDB RDS for MySQL instance to an AnalyticDB for PostgreSQL instance
Synchronize data from a self-managed MySQL database hosted on ECS to an AnalyticDB for PostgreSQL instance
Synchronize data from a self-managed MySQL database connected over Express Connect, VPN Gateway, or Smart Access Gateway to an AnalyticDB for PostgreSQL instance
Synchronize data from a self-managed MySQL database hosted on ECS to an Elasticsearch cluster
Synchronize data from an ApsaraDB RDS for MySQL instance to a MaxCompute project
Synchronize data from a self-managed MySQL database to a Message Queue for Apache Kafka instance
Synchronize data from an ApsaraDB RDS for MySQL instance to a self-managed Kafka cluster
Synchronize data from a self-managed MySQL database hosted on ECS to a self-managed Kafka cluster
Synchronize data from a self-managed MySQL database connected over Express Connect, VPN Gateway, or Smart Access Gateway to a self-managed Kafka cluster
Synchronize data to or from a PolarDB cluster Configure two-way data synchronization between PolarDB for MySQL clusters
Configure one-way data synchronization between PolarDB for MySQL clusters
Configure one-way data synchronization between PolarDB-O clusters
Synchronize data from a PolarDB for MySQL cluster to an ApsaraDB RDS for MySQL instance
Synchronize data from a PolarDB for MySQL cluster to an Elasticsearch cluster
Synchronize data from a PolarDB for MySQL cluster to a self-managed Kafka cluster
Synchronize data from a PolarDB for MySQL cluster to an AnalyticDB for MySQL cluster
Synchronize data from a PolarDB for MySQL cluster to an AnalyticDB for PostgreSQL instance
Synchronize data from a self-managed MySQL database hosted on ECS to a PolarDB for MySQL cluster
Synchronize data from a self-managed MySQL database connected over Express Connect, VPN Gateway, or Smart Access Gateway to a PolarDB for MySQL cluster
Synchronize data to or from a DRDS instance Synchronize data between DRDS instances
Synchronize data from a DRDS instance to an AnalyticDB for MySQL cluster
Synchronize data from a DRDS instance to an AnalyticDB for PostgreSQL instance
Synchronize data between Redis databases Configure one-way data synchronization between ApsaraDB for Redis instances
Synchronize data between ApsaraDB for Redis cluster instances across Alibaba Cloud accounts
Configure two-way data synchronization between ApsaraDB for Redis Enhanced Edition (Tair) instances
Synchronize data from a self-managed Redis database hosted on ECS to an ApsaraDB for Redis instance
Synchronize data from a self-managed Redis database connected over Express Connect, VPN Gateway, or Smart Access Gateway to a self-managed Redis database hosted on ECS
Synchronize data from a self-managed Redis cluster to an ApsaraDB for Redis cluster instance
Synchronize data from a Codis cluster hosted on ECS to an ApsaraDB for Redis instance
Synchronize data from a Twemproxy Redis cluster hosted on ECS to an ApsaraDB for Redis instance
Synchronize data between PostgreSQL databases Synchronize data from an ApsaraDB RDS for PostgreSQL instance to an AnalyticDB for PostgreSQL instance
Synchronize data from a self-managed PostgreSQL database to an AnalyticDB for PostgreSQL instance