All Products
Search
Document Center

Data Transmission Service:One-way data synchronization between Redis instances

Last Updated:Jun 08, 2026

Configure one-way data synchronization between Redis instances by using DTS. One-way synchronization applies to active geo-redundancy and geo-disaster recovery scenarios.

Warning

Do not change the architecture type of the source or destination database after you configure the task. For example, switching from master-replica to cluster architecture causes the task to fail.

Prerequisites

  • Supported source and destination Redis versions are listed in Synchronization solutions.

    Note

    Cross-version synchronization is supported only from earlier to later versions. Verify compatibility first — for example, create a pay-as-you-go Redis instance for testing, then release it or switch to subscription billing.

  • The destination Redis instance must have more storage space than the source Redis instance has used.

  • If the source Tair (Redis OSS-Compatible) instance is an Enterprise Edition (persistent memory-optimized) instance, you must enable the appendonly parameter.

  • A Tair (Redis OSS-Compatible) Enterprise Edition (capacity storage) instance can be a destination database only, not a source.

Usage notes

  • Initial full data synchronization increases the load on both the source and destination. If your databases handle high traffic or run on low-spec servers, synchronization may cause service interruptions. Evaluate the performance impact and run the task during off-peak hours.

  • If the source database has keys with an expiration policy, the destination database may report fewer keys when checked with a command like info. This is because expired keys may not be immediately deleted.

    Note

    The number of keys that do not have an expiration policy or have not expired is the same in both the source and destination databases.

  • Do not run FLUSHDB or FLUSHALL on the source database during synchronization. This causes data inconsistency between the source and destination.

  • If the destination runs out of memory, data eviction may cause inconsistency between the source and destination. The default maxmemory-policy for Tair (Redis OSS-Compatible) is volatile-lru, which does not affect task operation but may evict data.

    Set the destination eviction policy to noeviction to prevent data loss. With this policy, write operations fail and the task stops when memory is exhausted, but no data is evicted.

  • If you scale the source Redis instance (add or remove shards) or change its specifications during synchronization, reconfigure the task. Clear all synchronized data from the destination before reconfiguring to ensure data consistency.

  • If the source Redis instance connection address changes during synchronization (for example, due to an availability zone change or a switch from classic network to VPC), reconfigure the task.

  • When synchronizing from a standalone to a cluster Redis instance, Redis clusters allow a single command to operate on only one slot. Multi-key operations on keys in different slots return the following error:

    CROSSSLOT Keys in request don't hash to the same slot

    To prevent task interruptions, perform only single-key operations during DTS synchronization.

  • If the destination instance uses a cluster architecture and one of its shards reaches its memory limit, or if the destination instance runs out of storage space, the DTS task fails with an Out of Memory (OOM) error.
  • You cannot use DTS to synchronize data if transparent data encryption (TDE) is enabled on the source or destination instance.

  • For self-managed Redis sources, set repl-timeout between the replica and master to at least 600 seconds by running config set repl-timeout 600. Increase the repl-timeout value if the source database is large.

Supported synchronization topologies

  • One-to-one, one-way synchronization

  • One-to-many, one-way synchronization

  • Cascading one-way synchronization

Topology details and usage notes are covered in Data synchronization topologies.

Supported synchronization commands

  • 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 (supported only if the source Redis instance is version 4.0 or later)

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

Note
  • The PUBLISH command is not synchronized.

  • For Lua scripts invoked with EVAL or EVALSHA, DTS cannot guarantee that the scripts are successfully executed on the destination during incremental data synchronization. This is because the destination does not explicitly return an execution result.

  • For List data types, DTS does not clear existing data on the destination when retransmitting data with sync or psync. This may result in duplicate data.

Database account permissions

Database

Required permissions

Source Redis instance

Read permissions, as described in Create and manage accounts.

Destination Redis instance

Read and write permissions, as described in Create and manage accounts.

Procedure

  1. Purchase a data synchronization instance. Purchase a data synchronization task.

    Note

    When you purchase the instance, select Redis for both the source and destination instances.

  2. Log on to the Data Transmission Service console.

    Note

    If you are redirected to the Data Management (DMS) console, click the jiqiren icon in the lower-right corner and then click the 返回旧版 icon to return to the previous version of the Data Transmission Service (DTS) console.

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

  4. At the top of the Synchronization Tasks page, select the region where the destination instance is located.

  5. Find your data synchronization instance and click Configure Task in the Actions column.

  6. Configure the source and destination instances.

    Section

    Parameter

    Description

    N/A

    Synchronization task name

    DTS automatically generates a task name. Specify a descriptive name for easy identification. The name does not need to be unique.

    Source instance details

    Instance type

    Select Redis Instance.

    Instance region

    The region you selected when purchasing the data synchronization instance. This value cannot be changed.

    Instance ID

    Select the ID of the source Redis instance.

    Database password

    Enter the database account password for the source Redis instance. Required permissions are listed in Database account permissions.

    Note

    The password must be in the <user>:<password> format. For example, if the username is admin and the password is Rp829dlwa, enter admin:Rp829dlwa.

    Destination instance details

    Instance type

    Select Redis Instance.

    Instance region

    The region you selected when purchasing the data synchronization instance. This value cannot be changed.

    Instance ID

    Select the ID of the destination Redis instance.

    Database password

    Enter the database account password for the destination Redis instance. Required permissions are listed in Database account permissions.

    Note

    The password must be in the <user>:<password> format. For example, if the username is admin and the password is Rp829dlwa, enter admin:Rp829dlwa.

  7. In the lower-right corner of the page, click Set Whitelist and Next.

    Note
    • If the source or destination is an Alibaba Cloud database instance (such as ApsaraDB RDS for MySQL or ApsaraDB for MongoDB) or a self-managed database on an ECS instance, DTS automatically adds its server IP CIDR blocks to the instance whitelist or ECS security group rules. DTS server IP address blocks.

    • After the DTS task is complete or released, manually remove the DTS server IP address blocks.

  8. Configure the handling mode for existing destination objects and select synchronization objects.

    Setting

    Description

    Handling mode for existing objects

    • Precheck and Report Errors: Checks whether the destination database is empty. If not empty, the precheck fails and the task does not start.

    • Ignore Errors and Proceed: Skips the check for an empty destination database.

      Warning

      If you select Ignore Errors and Proceed, source data overwrites destination data with the same keys during synchronization. Use with caution.

    Synchronization objects

    • In the Source Objects box, click the database that you want to synchronize and click the

    • You can select databases as synchronization objects. You cannot select individual keys.

    Edit mapped name

    You cannot rename objects in this scenario.

    Replicate temporary tables during online DDL with DMS

    If you use Data Management (DMS) to perform online DDL changes on the source database, you can choose whether to synchronize the temporary tables generated by the DDL changes.

    • Yes: Synchronizes the temporary tables generated by online DDL changes.

      Note

      If a large amount of temporary table data is generated by online DDL changes, the data synchronization task may be delayed.

    • No: Does not synchronize the temporary tables generated by online DDL changes. Only the original DDL operations from the source database are synchronized.

      Note

      This option causes tables in the destination database to be locked.

    Connection retry duration

    If DTS cannot connect to the source or destination instance, it retries for 720 minutes (12 hours) by default. You can also specify a custom retry duration. If DTS reconnects to the source or destination instance within the specified duration, the synchronization task automatically resumes. Otherwise, the task fails.

    Note

    You are billed for task run time during connection retries. Customize the retry duration based on your business needs, or release the DTS instance as soon as the source and destination instances are released.

  9. Click Next.

  10. The initial synchronization method is fixed as Full Data + Incremental Data.

    Note
  11. After you finish the configuration, click Precheck and Start in the lower-right corner of the page.

    Note
    • Before the synchronization task starts, DTS performs a precheck. The task can start only after passing the precheck.

    • If the precheck fails, click the 提示 icon next to a check item to view the failure details.

      • You can fix the issues based on the details and run the precheck again.

      • If you do not need to fix the warning items, you can click Ignore or Ignore and Rerun Precheck to proceed.

  12. After Precheck Passed is displayed in the Precheck dialog box, close the Precheck dialog box. The synchronization job will then start.

  13. Wait for the task to initialize. Its status changes to Synchronizing.

    Note

    You can view the task status on the Data Synchronization page.