Data Transmission Service (DTS) allows you to perform one-way synchronization between ApsaraDB for Redis cluster instances that belong to different Alibaba Cloud accounts. This feature is applicable to scenarios such as resource migration or resource merging across Alibaba Cloud accounts and business architecture adjustment.
Prerequisites
- If the source Redis instance is a Community Edition instance, the engine version must
be 4.0 or 5.0. If the source Redis instance is an Enhanced Edition instance, the engine
version must be 5.0.
Note The engine version of the destination Redis instance can be 4.0 or 5.0. The engine version of the destination Redis instance cannot be earlier than the engine version of the source Redis instance. Before you synchronize data between two Redis instances that use different engine versions, check the compatibility of the two versions. For example, you can create a destination Redis instance based on the pay-as-you-go billing method to verify the compatibility between the source and destination instances. Then, you can release this instance or change the billing method of the instance to subscription.
- The source Redis instance is deployed in a virtual private cloud (VPC). If the source instance is deployed in the classic network, you can change the network type to VPC. For more information, see Switch to VPC network.
- Secure Sockets Layer (SSL) encryption is disabled for the source Redis instance. For more information, see Configure SSL encryption.
- The available storage space of the destination Redis instance is larger than the used storage space of the source Redis instance.
- ApsaraDB for Redis Enhanced Edition is integrated with more Redis modules than ApsaraDB for Redis Community Edition. For more information, see Integration of multiple Redis modules. To ensure compatibility between the source and destination instances, the edition of the destination instance must be Enhanced if the edition of the source instance is Enhanced.
Background information

DTS provides the following data migration solution:
DTS cannot migrate data of an ApsaraDB for Redis cluster instance. In this solution, the data synchronization feature of DTS is used to synchronize data to the destination instance. The following table describes how to configure a data synchronization task.
Step | Description |
---|---|
1. Use Account A to log on to the Alibaba Cloud Management Console and grant the required permission to a RAM role. For more information, see Step 1 in Before you begin. | When you configure the RAM role, set Account B as the trusted account, and authorize the RAM role to access the resources of Account A. |
2. Use Account A to log on to the Alibaba Cloud Management Console and prepare the environment that is required for the source Redis instance. For more information, see Steps 2 to 4 in Before you begin. | Add the CIDR blocks of DTS servers to the whitelist of the source Redis instance.
Apply for a private endpoint for the source Redis instance, and create a database
account that is authorized to replicate the data of the source Redis instance.
Note You are not allowed to create a database account that is authorized to replicate the data of ApsaraDB for Redis cluster instances. To enable this feature, submit a ticket.
|
3. Use Account B to log on to the Alibaba Cloud Management Console and configure the data synchronization task. For more information, see Procedure. | DTS cannot read the information of source Redis instance across Alibaba Cloud accounts. When you configure the data synchronization task, you must specify the source instance as a user-created database that is connected to DTS over Express Connect. |
Precautions
- DTS uses the resources of the source and destination instances during initial full data synchronization. This may increase the loads of the database servers. If you synchronize a large volume of data or the server specifications cannot meet your requirements, the database services may become unavailable. Before you synchronize data, evaluate the impact of data synchronization on the performance of the source and destination instances. We recommend that you synchronize data during off-peak hours.
- We recommend that you do not run the
FLUSHDB
orFLUSHALL
command on the source instance during data synchronization. If you run one of the two commands, data may become inconsistent between the source and destination instances. - If the data eviction policy (
maxmemory-policy
) of the destination instance is not set tonoeviction
, data may become inconsistent between the source and destination instances. For more information about the data eviction policy, see How does ApsaraDB for Redis evict data by default?
Operations that can be synchronized
Edition | Operation |
---|---|
ApsaraDB for Redis Community Edition |
|
ApsaraDB for Redis Enhanced Edition (Tair) |
|
- If you run the EVAL or EVALSHA command to call Lua scripts, DTS cannot identify whether these Lua scripts are executed on the destination database. During incremental data synchronization, the destination database does not explicitly return the execution results of Lua scripts.
- When DTS calls the SYNC or PSYNC command to transfer data of the LIST type, DTS does not clear the existing data. In this case, the destination database may contain duplicate data records.
Before you begin
Use the Alibaba Cloud account that owns the source Redis instance to log on to the Alibaba Cloud Management Console. Then, perform the following steps: