All Products
Search
Document Center

Data Transmission Service:One-way synchronization between Tair (Redis OSS-compatible) instances

Last Updated:Mar 28, 2026

Data Transmission Service (DTS) supports one-way synchronization between ApsaraDB for Tair (Redis OSS-Compatible) instances. Use this feature for active geo-redundancy and geo-disaster recovery.

Prerequisites

Before you begin, make sure that:

  • The destination ApsaraDB for Tair (Redis OSS-Compatible) instance is created. For more information, see Step 1: Create an instance.

  • The available storage space of the destination instance is larger than the used storage space of the source instance.

  • The destination database version is the same as or later than the source database version. A lower destination version may cause compatibility issues.

  • The source database account has read permissions, and the destination database account has read and write permissions. For more information, see Create and manage database accounts.

  • Transparent data encryption (TDE) is not enabled on the source or destination instance. TDE-enabled instances cannot be used with DTS.

  • If the source is an ApsaraDB for Tair (Enterprise Edition) instance with a Persistent Memory storage medium, the appendonly parameter is set to yes. For more information, see Disable AOF persistence.

  • Run config set repl-timeout 600 on the source instance to set the master-replica replication timeout to 600 seconds. If the source instance stores a large amount of data, increase this value based on your needs.

  • Increase the value of repl-backlog-size in redis.conf on the source instance to improve synchronization stability.

Billing

Synchronization typeFee
Full data synchronizationFree
Incremental data synchronizationCharged. For more information, 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.

Commands that can be synchronized

The following commands 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.

The following commands cannot be synchronized:

  • PUBLISH: not supported.

  • EVAL/EVALSHA (Lua scripts): DTS cannot confirm whether Lua scripts are executed on the destination during incremental synchronization, because the destination does not return explicit results.

  • SYNC/PSYNC for LIST data: DTS does not clear existing data before syncing, so the destination may contain duplicate records.

Usage notes

Before you configure the task

CategoryNote
Source database limitsDTS inserts a key prefixed with DTS_REDIS_TIMESTAMP_HEARTBEAT into the source database to track update timestamps. In a cluster architecture, DTS inserts this key into each shard. The key is filtered during synchronization and expires when the task ends.
Source database limitsIf the source database is read-only or the DTS account lacks WRITE (SETEX) permission, the reported synchronization latency may be inaccurate.
Source database limitsDo not run FLUSHDB or FLUSHALL on the source database. These commands cause data inconsistency between the source and destination.
Source database limitsIf expiration policies are set on specific source keys, those keys may not be deleted promptly after expiry. The destination may therefore contain fewer keys than the source. Run the info command to check the key count on the destination.
Source database limitsIf the source is a self-managed standalone Redis instance synchronizing to a Redis cluster: each command can only operate on a single slot. Performing operations on keys that belong to different slots causes the following error and interrupts synchronization: CROSSSLOT Keys in request don't hash to the same slot. Operate on only one key at a time during synchronization.
Destination database limitsDuring full data synchronization, DTS uses read and write resources of both instances, which may increase server load. Synchronize data during off-peak hours.
Destination database limitsOnly use DTS to write data to the destination during synchronization. Writing from other sources causes data inconsistency.
Destination database limitsIf the destination is deployed in a cluster architecture and a shard reaches its memory limit or the instance runs out of storage, the task fails due to out of memory (OOM).
Destination database limitsThe default maxmemory-policy for Tair (Redis OSS-Compatible) instances is volatile-lru. If the destination has insufficient memory, data eviction may cause inconsistency between instances without stopping the task. To prevent data loss, set maxmemory-policy to noeviction on the destination — the task fails if memory runs out, but no data is silently lost. For more information, see What is the default eviction policy of Tair?
TLS/SSLIf the ApsaraDB for Tair (Redis OSS-Compatible) instance has TLS enabled, connect to DTS using SSL-encrypted. TLSv1.3 is not supported. Instances with TLS enabled cannot connect to DTS as an Alibaba Cloud Instance.
Version compatibilityThe destination database version must be the same as or later than the source.

During and after synchronization

CategoryNote
Reconfiguration requiredIf the number of shards in the source instance changes, or you scale the database specifications (such as memory capacity), reconfigure the synchronization task. Clear the previously synchronized data from the destination before reconfiguring to ensure consistency.
Reconfiguration requiredIf the connection address of the source or destination self-managed Redis database changes during synchronization, reconfigure the task.
Full resynchronization triggersThe following situations may cause DTS to resynchronize all data to the destination, resulting in a temporary data inconsistency: a transient connection failure where breakpoint resume fails; a master-slave switch or failover on the source or destination; a change in the connection address; or a modification to the synchronization objects.
Restarting the taskRestarting a synchronization instance that includes both full and incremental tasks causes DTS to re-execute both phases.
DTS task restorationIf a DTS task fails, DTS technical support will attempt to restore it within 8 hours. During this process, the task may be restarted and task parameters (not database parameters) may be modified. Parameters that may be modified are listed in Modify instance parameters.

Configure a one-way synchronization task

Step 1: Open the Data Synchronization page

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

DTS console

  1. Log on to the DTS console.

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

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

DMS console

The actual operations may vary based on the mode and layout of the DMS console. For more information, see Simple mode and Customize the layout and style of the DMS console.
  1. Log on to the DMS console.

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

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

Step 2: Create a task

Click Create Task to open the task configuration page.

Step 3: Configure the source and destination databases

SectionParameterDescription
N/ATask NameThe task name. DTS generates a name automatically. Specify a descriptive name for easy identification. The name does not need to be unique.
Source DatabaseSelect Existing ConnectionIf the instance is already registered with DTS, select it from the drop-down list — DTS auto-fills the remaining parameters. See Manage database connections. In the DMS console, use the Select a DMS database instance drop-down. If the instance is not registered, configure the parameters below manually.
Source DatabaseDatabase TypeSelect Tair/Redis.
Source DatabaseAccess MethodSelect Alibaba Cloud Instance.
Source DatabaseInstance RegionSelect the region of the source ApsaraDB for Tair (Redis OSS-Compatible) instance.
Source DatabaseReplicate Data Across Alibaba Cloud AccountsSelect No (this example uses instances in the same account).
Source DatabaseInstance IDSelect the ID of the source instance.
Source DatabaseAuthentication MethodSelect Password Login for this example.
Note

Account + Password Login requires Redis version 6.0 or later. For Secret-free login, enable password-free access on the instance first — see Enable password-free access.

Source DatabaseDatabase PasswordEnter the password for the source instance. The format is <user>:<password> — for example, admin:Rp829dlwa. For account permissions, see the Prerequisites section.
Source DatabaseEncryptionSelect Non-encrypted or SSL-encrypted. If Access Method is not Alibaba Cloud Instance and you select SSL-encrypted, upload a CA Certificate and enter a CA Key.
Destination DatabaseSelect Existing ConnectionSame as the source database.
Destination DatabaseDatabase TypeSelect Tair/Redis.
Destination DatabaseAccess MethodSelect Alibaba Cloud Instance.
Destination DatabaseInstance RegionSelect the region of the destination ApsaraDB for Tair (Redis OSS-Compatible) instance.
Destination DatabaseReplicate Data Across Alibaba Cloud AccountsSelect No (this example uses instances in the same account).
Destination DatabaseInstance IDSelect the ID of the destination instance.
Destination DatabaseAuthentication MethodSelect Password Login for this example. Same notes apply as for the source.
Destination DatabaseDatabase PasswordEnter the password for the destination instance. The format is <user>:<password>.
Destination DatabaseEncryptionSelect Non-encrypted or SSL-encrypted.

Click Test Connectivity and Proceed at the bottom of the page.

Make sure the CIDR blocks of DTS servers are added to the security settings of both instances to allow DTS access. For more information, see Add the CIDR blocks of DTS servers.
If the source or destination is a self-managed database not accessed via Alibaba Cloud Instance, click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.

Step 4: Configure synchronization objects

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

    ParameterDescription
    Synchronization TypesSelect Incremental Data Synchronization, or Full Data Synchronization + Incremental Data Synchronization.
    Note

    If you select Incremental Data Synchronization, also select Full Data Synchronization.

    Synchronization TopologySelect One-way Synchronization.
    Note

    This parameter is only available when both the source and destination are Tair (Enterprise Edition) instances.

    Processing Mode of Conflicting TablesPrecheck and Report Errors: DTS checks whether data exists in the destination. If data exists, the precheck fails and the task cannot start. Ignore Errors and Proceed: Skips the existence check.
    Warning

    This may cause data loss — source records overwrite destination records with the same keys.

    Source ObjectsSelect databases to synchronize and click the arrow icon to add them to Selected Objects. You can only select databases, not individual keys. To filter specific keys, use the data filtering feature in Selected Objects.
    Selected ObjectsTo map data to a specific database (DB 0–DB 255) or filter by key prefix, right-click a database in Selected Objects and configure settings in the Edit Schema dialog. See Map object names and Specify filter conditions.
  2. Click Next: Advanced Settings and configure the following:

    ParameterDescription
    Dedicated Cluster for Task SchedulingBy default, DTS uses the shared cluster. Purchase a dedicated cluster for higher task stability. See What is a DTS dedicated cluster.
    Retry Time for Failed ConnectionsHow long DTS retries if the source or destination becomes unavailable. Valid values: 10–1440 minutes. Default: 720 minutes. Set this to more than 30 minutes. If DTS reconnects within this period, the task resumes; otherwise, it fails.
    Note

    If multiple tasks share the same source or destination database, the shortest retry time applies. Charges continue while DTS is retrying.

    Retry Time for Other IssuesHow long DTS retries if DDL or DML operations fail. Valid values: 1–1440 minutes. Default: 10 minutes. Set this to more than 10 minutes. This value must be less than Retry Time for Failed Connections.
    Enable Throttling for Full Data SynchronizationLimit DTS's resource usage on the source and destination during full synchronization by setting 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 SynchronizationLimit DTS's resource usage during incremental synchronization by setting RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s).
    Environment TagAn optional tag to identify the DTS instance.
    Extend Expiration Time of Destination Database KeyExtends the validity period of keys synchronized to the destination. Set this if your workflow uses the following commands to ensure consistency: EXPIRE key seconds, PEXPIRE key milliseconds, EXPIREAT key timestamp, PEXPIREAT key timestampMs.
    Note

    In distributed lock scenarios, extended expiry may delay lock release.

    Configure ETLSelect Yes to configure the extract, transform, and load (ETL) feature, then enter processing statements in the code editor. Select No to skip. See What is ETL? and Configure ETL in a data migration or data synchronization task.
    Monitoring and AlertingSelect Yes to configure alerts for task failures or latency exceeding a threshold, then set the alert threshold and notification contacts. Select No to skip. See Configure monitoring and alerting when you create a DTS task.
  3. Click Next Step: Data Verification to configure data verification. For more information, see Configure a data verification task.

Step 5: Run the precheck

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

  • Click Next: Save Task Settings and Precheck to save the configuration and start the precheck.

The task can only start after the precheck passes.
If the precheck fails, click View Details next to each failed item, troubleshoot the issues, then rerun the precheck.
If an alert is triggered: for items that cannot be ignored, troubleshoot and rerun the precheck. For items that can be ignored, click Confirm Alert Details, then click Ignore > OK > Precheck Again. Ignoring an alert may result in data inconsistency.

Step 6: 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:

    SectionParameterDescription
    New Instance ClassBilling MethodSubscription: pay upfront for a fixed term — 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 avoid ongoing charges.
    Resource Group SettingsThe resource group for this instance. Default: default resource group. See What is Resource Management?
    Instance ClassDTS provides multiple instance classes that differ in synchronization speed. Select based on your throughput requirements. See Instance classes of data synchronization instances.
    Subscription DurationFor subscription billing only: select 1–9 months, or 1, 2, 3, or 5 years.
  3. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  4. Click Purchase And Start, then click OK in the confirmation dialog.

The task appears on the Data Synchronization page. You can monitor its progress there.

If the task includes both full and incremental synchronization (Synchronization Types includes both Full Data Synchronization and Incremental Data Synchronization), it displays as Incremental Data Synchronization in the task list after the full phase completes.

What's next

After the synchronization task is running, verify that data is flowing correctly:

  • Check the task status on the Data Synchronization page — a healthy task shows Synchronizing.

  • Monitor synchronization latency in the task details. High or growing latency may indicate that the source database is generating changes faster than DTS can apply them, or that a network issue is slowing replication.

  • If you configured Monitoring and Alerting, confirm that alerts are set up for task failure and latency thresholds.

  • If the task fails, check the error details and refer to the Usage notes section for common causes. DTS technical support will also attempt to restore a failed task within 8 hours.