Use Data Transmission Service (DTS) to synchronize data from a Tair (Redis OSS-Compatible) instance under one Alibaba Cloud account to an instance under a different account. This setup supports resource migration across accounts and business architecture adjustments.
The process involves two accounts:
Account A — owns the source instance. Grants cross-account access via a RAM role.
Account B — owns the destination instance. Configures and runs the DTS synchronization task.
Prerequisites
Before you begin, make sure that you have:
A destination Tair (Redis OSS-Compatible) instance with available storage larger than the total data size in the source instance
Verified that your source and destination instance versions are compatible. See Overview of data synchronization scenarios for supported versions.
Limits
Compatibility constraints (check before you configure)
Review these constraints before starting. If any apply to your setup, resolve them first.
| Constraint | Detail |
|---|---|
| TDE | If transparent data encryption (TDE) is enabled on either instance, DTS cannot synchronize data. |
| SSL/TLS | SSL-encrypted connections do not support TLSv1.3. Tair instances with SSL enabled cannot connect to DTS as an Alibaba Cloud Instance. |
| Source version | Synchronize from a lower or equal version to a higher version. Synchronizing from a higher to a lower version may cause compatibility issues. |
| Cluster cross-slot operations | If the source is a Basic Edition instance and the destination is a cluster instance, operations on keys spanning multiple slots cause a CROSSSLOT Keys in request don't hash to the same slot error. During synchronization, operate on one key at a time. |
| Persistent memory (Tair Enterprise Edition) | If the source uses Persistent Memory storage, set the appendonly parameter to yes before starting. See Disable AOF persistence. |
| Memory eviction policy | By default, Tair (Redis OSS-Compatible) instances use the volatile-lru eviction policy. If the destination runs low on memory, data eviction can cause inconsistency without stopping the task. Set maxmemory-policy to noeviction on the destination to make the task fail explicitly instead of silently losing data. See What is the default eviction policy of Tair? |
| Destination storage | If a shard's memory reaches its limit, or the destination has insufficient storage, the task fails with an out of memory (OOM) error. |
| Other writes to the destination | Writing data from other sources to the destination during synchronization causes data inconsistency. |
Runtime behaviors
These behaviors apply while the task is running.
| Behavior | Detail |
|---|---|
| Heartbeat key | DTS inserts a key prefixed DTS_REDIS_TIMESTAMP_HEARTBEAT into the source database to track update timestamps. For cluster instances, DTS inserts this key into each shard. The key is filtered during synchronization and expires when the task ends. |
| Latency reporting | If the source is read-only or the DTS account lacks SETEX permission, reported synchronization latency may be inaccurate. |
repl-backlog-size | Increase the repl-backlog-size value in redis.conf to improve synchronization stability. |
| Key expiration | Keys with an expiration policy may not be deleted immediately after they expire. As a result, the destination may have fewer keys than the source. Run the info command to view the number of keys in the destination database. |
| Self-managed Redis: replication timeout | For self-managed Redis sources, run config set repl-timeout 600 to set a 600-second replication timeout. Increase this value if the source has a large dataset. |
| Self-managed Redis: connection address changes | If the connection address of a self-managed source or destination changes during synchronization, reconfigure the task. |
| Shard count or spec changes | If the source shard count changes, or if you change the database specifications (such as scaling up memory capacity), reconfigure the task. Clear already-synchronized data in the destination before reconfiguring to maintain consistency. |
| Restarting a synchronization instance | Restarting the instance may cause DTS to re-run both the full and incremental synchronization phases. |
| Full resynchronization triggers | Any of the following causes DTS to resynchronize all data to the destination, which may result in temporary inconsistency: a transient connection failure (breakpoint resume fails), a primary-replica switch or failover, a connection address change, or a modification to the synchronization objects. |
| LIST data (SYNC/PSYNC) | DTS does not clear existing LIST data in the destination when transferring via SYNC or PSYNC. The destination may contain duplicate records. |
| Task failure recovery | If a task fails, DTS technical support attempts to restore it within 8 hours. During recovery, the task may be restarted and task parameters (not database parameters) may be modified. |
Billing
| Synchronization type | Fee |
|---|---|
| Schema synchronization and full data synchronization | Free |
| Incremental data synchronization | Charged. See Billing overview. |
Commands supported for incremental synchronization
Tair (Redis OSS-Compatible) Open-Source Edition
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, SWAPDB, UNLINK (SWAPDB and UNLINK can be synchronized only if the engine version of the source database is Redis 4.0), XADD, XCLAIM, XDEL, XAUTOCLAIM, XGROUP CREATECONSUMER, XTRIM, ZADD, ZINCRBY, ZINTERSTORE, ZREM, ZREMRANGEBYLEX, ZREMRANGEBYRANK, ZREMRANGEBYSCORE, ZUNIONSTORE
Tair (Redis OSS-Compatible) Enterprise Edition
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, RPOP, RPOPLPUSH, RPUSH, RPUSHX, SADD, SDIFFSTORE, SELECT, SET, SETBIT, SETEX, SETNX, SETRANGE, SINTERSTORE, SMOVE, SPOP, SREM, SUNIONSTORE, UNLINK, XADD, XCLAIM, XDEL, XAUTOCLAIM, XGROUP CREATECONSUMER, XTRIM, ZADD, ZINCRBY, ZINTERSTORE, ZREM, ZREMRANGEBYLEX, ZREMRANGEBYRANK, ZREMRANGEBYSCORE, ZUNIONSTORE
Unsupported commands and caveats
PUBLISH is not supported.
For EVAL and EVALSHA: DTS cannot confirm whether Lua scripts executed on the source also execute successfully on the destination, because the destination does not return explicit results during incremental synchronization.
For SYNC and PSYNC on LIST data: DTS does not clear existing data in the destination before writing, so the destination may contain duplicate records.
Step 1: Grant cross-account access (Account A)
Log in to the Alibaba Cloud Management console with Account A (the account that owns the source Tair instance). Create a RAM role, set Account B as the trusted account, and authorize the RAM role to access Account A's cloud resources.
For detailed steps, see Configure RAM authorization for cross-account DTS tasks.
Step 2: Configure the synchronization task (Account B)
Log in with Account B (the account that owns the destination Tair instance) and complete the following steps.
Go to the Data Synchronization Tasks page
DTS console
Log on to the DTS console.
In the navigation pane on the left, click Data Synchronization.
In the upper-left corner of the page, select the region where the synchronization instance is located.
DMS console
The actual steps may vary depending on the mode and layout of the DMS console. For more information, see Simple mode console and Customize the layout and style of the DMS console.
Log on to the DMS console.
In the top menu bar, choose .
To the right of Data Synchronization Tasks, select the region of the synchronization instance.
Create and configure the task
Click Create Task.
(Optional) Click New Configuration Page in the upper-right corner.
Skip this step if Back to Previous Version is displayed instead. The new configuration page is recommended.
Configure the source and destination databases.
WarningRead the Limits displayed on the configuration page after filling in the parameters. Skipping this may result in task failures or data inconsistency.
Source database parameters
Parameter Value Task Name Enter a descriptive name. Names do not need to be unique. Select Existing Connection Optional. Select a registered DTS database connection to auto-populate parameters. If not using a registered connection, configure the parameters below manually. Database Type Select Tair/Redis. Access Method Select Alibaba Cloud Instance. Instance Region Select the region of the source instance. Replicate Data Across Alibaba Cloud Accounts Select Yesalert notification settings. This supports cross-site communication between Chinese mainland accounts and international accounts. Alibaba Cloud Account Enter the ID of the primary account (Account A) that owns the source instance. RAM Role Name Enter the name of the RAM role created in Step 1. Instance ID Select the source instance ID. Authentication Method Select Password Login or Secret-free login. For secret-free login, make sure password-free access is enabled on the source instance. See Enable password-free access. Database Password Enter the account credentials. For the default account, enter only the password. For a custom account, use the format <account>:<password>(for example,testaccount:Test1234). Leave blank if no password is set. The account must have read permission. To reset a forgotten password, see Modify or reset the password.Encryption Select Non-encrypted or SSL-encrypted. For SSL-encrypted self-managed Redis, upload a CA Certificate and enter a CA Key. Destination database parameters
Parameter Value Select Existing Connection Optional. Select a registered DTS database connection to auto-populate parameters. Database Type Select Tair/Redis. Access Method Select Alibaba Cloud Instance. Instance Region Select the region of the destination instance. Replicate Data Across Alibaba Cloud Accounts Select No. Cross-account access is configured at the source end in this setup. Instance ID Select the destination instance ID. Authentication Method Select Password Login or Secret-free login. For secret-free login, see Enable password-free access. Database Password Enter the account credentials. For a custom account, use the format <account>:<password>. The account must have read and write permissions.Encryption Select Non-encrypted or SSL-encrypted. Click Test Connectivity and Proceed.
DTS server CIDR blocks must be added to the security settings of both databases. See Add the CIDR blocks of DTS servers. For self-managed databases, click Test Connectivity in the CIDR Blocks of DTS Servers dialog box.
In the Configure Objects step, set the following parameters:
Parameter Description Synchronization Types Select Full Data Synchronization and Incremental Data Synchronization (recommended together). Full synchronization loads historical data into the destination before incremental sync begins. Synchronization Topology Select One-way Synchronization. This parameter is available only when both instances are Tair Enterprise Edition. Processing Mode of Conflicting Tables Precheck and Report Errors: fails the precheck if the destination already contains data — use this to prevent accidental overwrites. Ignore Errors and Proceed: skips the check and lets source data overwrite matching keys in the destination. This may cause data loss — use with caution. Source Objects Select the databases to synchronize and move them to Selected Objects. Select databases only — individual keys cannot be selected. Selected Objects To synchronize a specific database (DB 0 to DB 255) or filter by key prefix, right-click the database in Selected Objects and configure the mapping or filter in the Edit Schema dialog box. See Map object names and Specify filter conditions. Multiple object names cannot be mapped at once. Click Next: Advanced Settings and configure the following:
Parameter Description Dedicated Cluster for Task Scheduling Optional. Assign the task to a dedicated cluster for improved stability. See What is a DTS dedicated cluster. Retry Time for Failed Connections How long DTS retries after a connection failure. Valid range: 10–1440 minutes. Default: 720. Set to 30 or higher. If reconnection fails within this window, the task fails. A shorter retry time across multiple tasks sharing the same database takes precedence. DTS charges continue during retry periods. Retry Time for Other Issues How long DTS retries after operation failures (DDL/DML errors). Valid range: 1–1440 minutes. Default: 10. Set to 10 or higher. Must be less than Retry Time for Failed Connections. Enable Throttling for Full Data Synchronization Optional. Limit QPS to the source, RPS, and data transfer speed during full synchronization to reduce load on the destination database server. Available only if Full Data Synchronization is selected. Enable Throttling for Incremental Data Synchronization Optional. Set RPS and transfer speed limits for incremental synchronization. Extend Expiration Time of Destination Database Key Adds extra time (in seconds) to the TTL of keys synchronized to the destination. Applies when using EXPIRE, PEXPIRE, EXPIREAT, or PEXPIREAT commands. If you use this for distributed lock scenarios, locks may not release on time. Environment Tag Optional. Tags the DTS instance by environment. Configure ETL Optional. Enable to apply extract, transform, and load (ETL) logic to data during synchronization. See What is ETL? and Configure ETL in a data migration or data synchronization task. Monitoring and Alerting Optional. Configure alerts for task failures or latency threshold breaches. 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 the task starts. If any item fails:
Click View Details next to the failed item, resolve the issue, and click Precheck Again.
For ignorable alerts, click Confirm Alert Details, then Ignore in the dialog box, and click Precheck Again. Ignoring alerts may result in data inconsistency.
To preview the API parameters for this task, hover over the button and click Preview OpenAPI parameters before proceeding.
Once Success Rate reaches 100%, click Next: Purchase Instance.
On the purchase page, configure the billing and instance settings:
Parameter Description Billing Method Subscription: pay upfront for a fixed term — more cost-effective for long-running tasks. Pay-as-you-go: billed hourly — suitable for short-term use. Release the instance when done to stop charges. Resource Group Settings Assign the instance to a resource group. Default: default resource group. See What is Resource Management?. Instance Class Select an instance class based on the required synchronization throughput. See Instance classes of data synchronization instances. Subscription Duration Available only for Subscription billing. Options: 1–9 months, 1 year, 2 years, 3 years, or 5 years. Read and accept Data Transmission Service (Pay-as-you-go) Service Terms, then click Purchase and Start. In the confirmation dialog box, click OK.
Verify the task
Go to the Data Synchronization page to monitor task progress. If the task includes both full and incremental synchronization, the status shows Incremental Data Synchronization after full synchronization completes.