All Products
Search
Document Center

Data Transmission Service:Synchronize data from a self-managed Redis database on an ECS instance to a Tair (Redis-Compatible) instance

Last Updated:Mar 28, 2026

Data Transmission Service (DTS) synchronizes data in real time from a self-managed Redis database on an Elastic Compute Service (ECS) instance to a Tair (Redis-Compatible) instance. DTS uses PSYNC/SYNC replication to first complete a full data copy, then continuously applies incremental changes — keeping the destination in sync without stopping your source database.

Warning

After you configure a data synchronization task, do not change the architecture of the source or destination database. Doing so causes the task to fail.

Prerequisites

Before you begin, ensure that you have:

  • A self-managed Redis instance running on an ECS instance

  • A Tair (Redis-Compatible) instance using direct connection mode. For setup instructions, see Create a Tair instance

    DTS supports only Tair (Redis-Compatible) instances in direct connection mode. For supported versions, see Synchronization solutions.
  • Storage space on the destination instance that exceeds the total data size of the source database

  • For cluster-architecture sources: all cluster nodes can run the PSYNC command and share the same connection password

  • Source account with PSYNC and SYNC permissions

  • A repl-timeout value of at least 600 seconds on the source instance. Run the following command to set it:

    config set repl-timeout 600

    The default is 60 seconds. If the source database contains a large amount of data, you can increase the value of the repl-timeout parameter as needed.

Billing

Synchronization typeFee
Full data synchronizationFree
Incremental data synchronizationCharged. See Billing overview

Supported synchronization topologies

  • One-way one-to-one synchronization

  • One-way one-to-many synchronization

  • One-way cascade synchronization

For details, see Synchronization topologies.

Supported operations

The following Redis operations can be synchronized:

  • APPEND

  • BITOP, BLPOP, BRPOP, BRPOPLPUSH

  • DECR, DECRBY, DEL

  • EVAL, EVALSHA, EXEC, EXPIRE, EXPIREAT

  • GEOADD, GETSET

  • HDEL, HINCRBY, HINCRBYFLOAT, HMSET, HSET, HSETNX

  • INCR, INCRBY, INCRBYFLOAT

  • LINSERT, LPOP, LPUSH, LPUSHX, LREM, LSET, LTRIM

  • MOVE, MSET, MSETNX, MULTI

  • PERSIST, PEXPIRE, PEXPIREAT, PFADD, PFMERGE, PSETEX

  • RENAME, RENAMENX, RESTORE, RPOP, RPOPLPUSH, RPUSH, RPUSHX

  • SADD, SDIFFSTORE, SELECT, SET, SETBIT, SETEX, SETNX, SETRANGE, SINTERSTORE, SMOVE, SPOP, SREM, SUNIONSTORE

  • ZADD, ZINCRBY, ZINTERSTORE, ZREM, ZREMRANGEBYLEX, ZUNIONSTORE, ZREMRANGEBYRANK, ZREMRANGEBYSCORE

  • SWAPDB, UNLINK (source engine version 4.0 only)

  • XADD, XCLAIM, XDEL, XAUTOCLAIM, XGROUP CREATECONSUMER, XTRIM

PUBLISH operations cannot be synchronized.
If EVAL or EVALSHA calls Lua scripts, DTS cannot confirm whether those scripts were executed on the destination during incremental synchronization — the destination does not return explicit results for Lua scripts.
When SYNC or PSYNC transfers LIST data, DTS does not clear existing data in the destination, which can cause duplicate records.

Restrictions

Source database restrictions

RestrictionDetails
FLUSHDB / FLUSHALL commandsDo not run these commands during synchronization — they cause data inconsistency between source and destination.
bind parameter in redis.confIf configured, set it to the private IP address of the ECS instance so DTS can connect.
DTS heartbeat keyDTS inserts a key prefixed with DTS_REDIS_TIMESTAMP_HEARTBEAT into the source database to track update timestamps. In cluster mode, this key is inserted into each shard. The key is filtered during synchronization and expires when the task ends.
Latency reportingLatency may be inaccurate if the source database is read-only or if the DTS account lacks write (SETEX) permission.
repl-backlog-sizeIncrease this value in the source redis.conf to improve synchronization stability.
Key expirationKeys with expiration policies may not expire immediately — the destination may have fewer keys than the source. Run INFO on the destination to check the current key count. Keys without expiration policies, or those that have not expired, are synchronized identically.
Basic Edition to cluster (CROSSSLOT error)A Redis cluster allows commands to operate on only a single slot. Multi-key commands across slots fail with CROSSSLOT Keys in request don't hash to the same slot. Run only single-key commands during synchronization.

Other restrictions

RestrictionDetails
Version compatibilitySynchronize from an earlier Redis version to a later version. Synchronizing from a later to an earlier version may cause compatibility issues.
Source scaling during synchronizationIf the source instance is scaled (shards added or removed) or its memory is scaled up, reconfigure the task. Clear all data in the destination before reconfiguring to maintain consistency.
Endpoint changesIf the source or destination is a self-managed instance and its endpoint changes — for example, due to migration or failover — the task may retry, experience latency, or fail. Check the task status and reconfigure if needed.
Destination failoverIf a failover occurs on the destination, data might be written only to memory without being persisted to the secondary database, which can cause data loss.
Full synchronization loadDTS uses resources from both source and destination during full synchronization, increasing server load. Run synchronization during off-peak hours for large datasets.
FLUSHDB / FLUSHALL (cluster-to-cluster)Do not run these commands when synchronizing between Redis clusters — they cause data inconsistency.
Destination memory evictionThe default eviction policy (maxmemory-policy) of Tair (Redis-Compatible) is volatile-lru. If the destination runs out of memory, eviction causes data inconsistency without stopping the task. Set the policy to noeviction to prevent silent data loss: if the destination runs out of memory, writes fail and the task stops, but no data is lost through eviction. See Redis data eviction policies.
External writes to destinationDo not write data to the destination from any source other than DTS during synchronization — this causes data inconsistency.
Cluster destination OOMIf a shard in a cluster-edition destination reaches its memory limit, or if the destination has insufficient storage space, the task fails with an out of memory (OOM) error.
Transparent Data Encryption (TDE)If TDE is enabled on the destination, DTS cannot synchronize data to it.
Full re-synchronization triggersA full re-synchronization may occur in these situations, which can cause data inconsistency: a transient connection failure prevents breakpoint resumption; a failover occurs on the source or destination; the source or destination endpoint changes; or the synchronization objects are modified.
TLS encryptionIf Transport Layer Security (TLS) encryption is enabled on a Tair (Redis OSS-Compatible) instance, use an SSL-encrypted connection. TLSv1.3 is not supported. Instances with SSL enabled cannot use the Alibaba Cloud Instance access method.
Full + incremental task restartIf the synchronization instance includes both full and incremental tasks, restarting may cause both tasks to run again from the beginning.
DTS instance recoveryIf the DTS instance fails, DTS attempts recovery within 8 hours. During recovery, the instance may be restarted or have its parameters adjusted. Only DTS instance parameters are modified — database parameters are not changed. For parameters that may be modified, see Modify instance parameters.

Configure a synchronization task

The configuration process consists of five steps: open the synchronization page, configure source and destination databases, configure synchronization objects, run the precheck, and purchase the instance.

Step 1: Open the data synchronization page

Use one of the following methods to reach the Data Synchronization page.

DTS console

  1. Log in to the DTS console.DTS console

  2. In the left-side navigation pane, click Data Synchronization.

  3. In the upper-left corner, select the region where the synchronization task resides.

DMS console

Steps may vary based on the DMS console mode and layout. See Simple mode and Customize the layout and style of the DMS console.
  1. Log in to the DMS console.DMS console

  2. In the top navigation bar, hover over Data + AI and choose DTS (DTS) > Data Synchronization.

  3. From the drop-down list to the right of Data Synchronization Tasks, select the region where the synchronization instance resides.

Step 2: Configure source and destination databases

  1. Click Create Task.

  2. On the task configuration page, configure the parameters in the following tables.

General settings

ParameterDescription
Task NameDTS auto-generates a task name. Specify a descriptive name to identify the task. The name does not need to be unique.

Source database

ParameterDescription
Select Existing ConnectionIf the source instance is registered with DTS, select it from the drop-down list — DTS auto-fills the remaining parameters. Otherwise, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list.
Database TypeSelect Tair/Redis.
Access MethodSelect Self-managed Database On ECS.
Instance RegionSelect the region of the ECS instance hosting the source Redis database.
Cross-Account (Alibaba Cloud)Select No (same Alibaba Cloud account).
ECS Instance IDSelect the ECS instance ID where the source Redis database runs. For cluster-architecture sources, select the ECS instance of a primary node, then manually add the DTS server IP CIDR blocks of the corresponding region to the security rules of each other ECS instance. See Create a security group, Associate a security group with an instance (primary ENI), and Add the CIDR blocks of DTS servers to a whitelist.
Instance ModeSelect Basic Edition or Cluster based on the source Redis architecture.
PortEnter the service port of the source Redis database. Default: 6379. For cluster sources, enter the port of a primary node.
Authentication MethodSelect the authentication method. This example uses Password Login. Account + Password Login requires Redis 6.0 or later. For Secret-free login, make sure password-free access is enabled on the database. See Enable password-free access.
Database PasswordEnter the password for the source Redis database. This field is optional — leave it blank if no password is set. The format is <user>:<password>, for example, admin:Rp829dlwa.
EncryptionSelect Non-encrypted or SSL-encrypted. If SSL-encrypted is selected for a non-Alibaba Cloud instance, upload a CA Certificate and enter a CA Key.

Destination database

ParameterDescription
Select Existing ConnectionIf the destination instance is registered with DTS, select it from the drop-down list — DTS auto-fills the remaining parameters. Otherwise, configure the parameters below manually. In the DMS console, select the instance from the Select a DMS database instance list.
Database TypeSelect Tair/Redis.
Access MethodSelect Cloud Instance.
Instance RegionSelect the region of the destination Tair (Redis-Compatible) instance.
Replicate Data Across Alibaba Cloud AccountsSelect No (same Alibaba Cloud account).
Instance IDSelect the ID of the destination Tair (Redis-Compatible) instance.
Authentication MethodSelect the authentication method. This example uses Password Login. Account + Password Login requires Redis 6.0 or later.
Database PasswordEnter the password for the destination Tair (Redis-Compatible) instance. The format is <user>:<password>, for example, admin:Rp829dlwa.
EncryptionSelect Non-encrypted or SSL-encrypted based on your business requirements. If Access Method is not set to Alibaba Cloud Instance and you select SSL-encrypted, you must upload a CA Certificate and enter a CA Key.
  1. Click Test Connectivity and Proceed.

    - DTS server CIDR blocks must be added to the security settings of both source and destination databases. See Add DTS server IP addresses to a whitelist. - If the source or destination is a self-managed database (not Alibaba Cloud Instance), click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

Step 3: Configure synchronization objects

  1. In the Configure Objects step, set the following parameters.

ParameterDescription
Synchronization TypesFull Data Synchronization + Incremental Data Synchronization is selected by default.
Processing Mode of Conflicting TablesPrecheck and Report Errors: checks whether data exists in the destination. If data exists, the precheck fails and the task cannot start. Ignore Errors and Proceed: skips the destination existence check.
Warning

This option may cause data loss — source data overwrites matching keys in the destination.

Source ObjectsSelect one or more databases from Source Objects and click 向右 to add them to Selected Objects. Only databases can be selected — individual keys cannot.
Selected ObjectsTo map a database to a different DB number (DB 0 to DB 255) or filter by key prefix, right-click the database in Selected Objects and configure settings in the Edit Schema dialog box. See Map object names and Specify filter conditions. Multiple object name mappings cannot be configured at the same time.
  1. Click Next: Advanced Settings and configure the following parameters.

ParameterDescription
Dedicated Cluster for Task SchedulingBy default, DTS schedules tasks to the shared cluster. To improve stability, purchase a dedicated cluster. See What is a DTS dedicated cluster.
Retry Time for Failed ConnectionsHow long DTS retries after a connection failure. Valid values: 10–1440 minutes. Default: 720. Set to more than 30 minutes. If DTS reconnects within this period, the task resumes; otherwise, it fails. If multiple tasks share the same source or destination, the shortest retry period applies. DTS charges for the instance during retry.
Retry Time for Other IssuesHow long DTS retries after DDL or DML failures. Valid values: 1–1440 minutes. Default: 10. Set to more than 10 minutes. This value must be less than Retry Time for Failed Connections.
Enable Throttling for Full Data SynchronizationThrottle full synchronization to reduce load on source and destination. 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 Synchronization is selected.
Enable Throttling for Incremental Data SynchronizationThrottle incremental synchronization. Configure RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s).
Environment TagTag the instance with an environment label. Optional.
Extend Expiration Time of Destination Database KeySet an extended expiration time for synchronized keys. Use this to maintain data consistency when the source uses expiration commands. In distributed lock scenarios, this may delay lock release. Affected commands: EXPIRE, PEXPIRE, EXPIREAT, PEXPIREAT.
Use Slave NodeAvailable when the source Instance Mode is Cluster. Choose to read from primary or replica nodes. Default: No (reads from the primary node).
Configure ETLEnable extract, transform, and load (ETL) to apply data transformations during synchronization. Yes: configure ETL using the code editor. See Configure ETL in a data migration or synchronization task. No: skip ETL. See What is ETL?
  1. Click Next Step: Data Verification to configure data verification. See Configure a data verification task.

Step 4: Run the precheck

  1. To view API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.

  2. Click Next: Save Task Settings and Precheck.

DTS runs a precheck before the task starts. The task can only start after the precheck passes.

  • If the precheck fails, click View Details next to the failed item to see the cause. Fix the issue and run the precheck again.

  • If an alert is triggered:

    • For alerts that cannot be ignored, click View Details, fix the issue, and run the precheck again.

    • For alerts that can be ignored, click Confirm Alert Details, then click Ignore > OK > Precheck Again. Ignoring alerts may cause data inconsistency.

Step 5: Purchase and start the instance

  1. Wait until the Success Rate reaches 100%, then click Next: Purchase Instance.

  2. On the purchase page, configure the following parameters.

ParameterDescription
Billing MethodSubscription: pay upfront for a fixed period — more cost-effective for long-term use. Pay-as-you-go: billed hourly — suitable for short-term use. Release the instance when no longer needed to stop charges.
Resource Group SettingsThe resource group for the synchronization instance. Default: default resource group. See What is Resource Management?
Instance ClassSelect an instance class based on the required synchronization speed. See Instance classes of data synchronization instances.
Subscription DurationAvailable for Subscription billing only. Options: 1–9 months, or 1, 2, 3, or 5 years.
  1. Read and accept Data Transmission Service (Pay-as-you-go) Service Terms.

  2. Click Purchase And Start, then click OK.

The task appears on the data synchronization page. If the task includes both Full Data Synchronization and Incremental Data Synchronization, it is displayed as a single Incremental Data Synchronization task in the task list.

What's next

  • Monitor task status and latency on the data synchronization page.

  • DTS also supports one-way synchronization between Tair (Redis-Compatible) instances. The configuration steps are the same as described in this topic.

  • For synchronization topology options, see Synchronization topologies.