Based on Data Transmission Service (DTS) and the redis-shake synchronization tool, ApsaraDB for Redis provides multiple data synchronization solutions. These solutions apply to the following scenarios: data synchronization between on-premises Redis databases and Alibaba Cloud services, active geo-redundancy, disaster recovery, and data analysis.

Data synchronization tools

  • DTS (Recommended)

    DTS is a real-time data streaming service. The service allows you to migrate, subscribe to, and synchronize data by using stable and secure transmission channels. DTS supports one-way and two-way data synchronization. These synchronization solutions apply to scenarios such as active geo-redundancy and geo-disaster recovery.

  • redis-shake

    redis-shake is an open source Linux-based tool developed by Alibaba Cloud. You can use this flexible and efficient tool to parse (decode mode), restore (restore mode), back up (dump mode), and synchronize (sync or rump mode) data on ApsaraDB for Redis instances. In scenarios where DTS is not applicable, you can use redis-shake to synchronize data.

The following table describes the differences between DTS and redis-shake in their support for Redis synchronization. For more information, see the following table.

Note The database types and architectures described in the following table support any combination, such as data synchronization from a user-created Redis database (cluster architecture) to an ApsaraDB for Redis Community Edition (standard architecture).
Table 1. Synchronization support
Tool Supported source database Supported destination database Supported architecture Supported synchronization topology
DTS (Recommended)
  • User-created Redis database

    Version 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Version 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)

    Version 5.0

  • User-created Redis database

    Version 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Version 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)

    Version 5.0

Note Read/write splitting instances do not support to synchronize data among ApsaraDB for Redis instances that belong to different Alibaba Cloud accounts.
  • One-way synchronization
  • Two-way synchronization
Note Only ApsaraDB for Redis Enhanced Edition instances (Redis 5.0) support two-way synchronization.
redis-shake
  • User-created Redis database

    Version 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Version 4.0 and 5.0

  • User-created Redis database

    Version 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Version 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)

    Version 5.0

One-way synchronization

Required permissions

DTS and redis-shake have different required permissions for different synchronization scenarios. Before you configure data synchronization, you must obtain relevant permissions for the source and destination databases based on the synchronization scenarios that are described in the following table.

Note For more information about how to create an account for an ApsaraDB for Redis instance and grant the account required permissions, see Manage database accounts.
Table 2. Required permissions
Tool Scenario Permissions on the source database Permissions on the destination database
DTS (Recommended)
  • Synchronize data between ApsaraDB for Redis instances that belong to the same Alibaba Cloud account.
  • Synchronize data from ApsaraDB for Redis instances to user-created Redis databases.
Read permissions Read and write permissions
  • Synchronize data between ApsaraDB for Redis instances that belong to different Alibaba Cloud accounts.
Copy permissions
Note If the source database is a cluster instance or read/write splitting instance, you cannot create an account that is granted the copy permissions.To create such accounts, submit a ticket.
Read and write permissions
  • Synchronize data from user-created Redis databases to ApsaraDB for Redis instances.
  • Synchronize data between user-created Redis databases.
Permissions to run the SYNC or PSYNC command. Read and write permissions
redis-shake
  • Synchronize data from user-created Redis databases to ApsaraDB for Redis instances.
  • Synchronize data between user-created Redis databases.
Permissions to run the SYNC or PSYNC command. Read and write permissions
  • Synchronize data between ApsaraDB for Redis instances that belong to the same Alibaba Cloud account.
  • Synchronize data between ApsaraDB for Redis instances that belong to different Alibaba Cloud accounts
  • Synchronize data from ApsaraDB for Redis instances to user-created Redis databases.
Copy permissions Read and write permissions

Data synchronization solutions

Notice The configuration methods for common scenarios share similar procedures. The following table describes configuration methods for general data synchronization scenarios. If your scenario is not included in the following table, you can refer to the documentation about similar scenarios and configure the required permissions.
Scenario Tool Solution
Synchronize data from user-created databases to ApsaraDB for Redis instances. DTS Synchronize data from a user-created Redis cluster to an ApsaraDB for Redis cluster instance
Synchronize data from a user-created Redis database hosted on ECS to an ApsaraDB for Redis instance
Synchronize data from a Codis cluster hosted on ECS to an ApsaraDB for Redis instance
Synchronize data from Twemproxy Redis on ECS to ApsaraDB for Redis
ssdb-port Use ssdb-port to synchronize data from SSDB to ApsaraDB for Redis
Note You can use ssdb-port to synchronize data from Sequence Similarity DataBase (SSDB) to ApsaraDB for Redis in real time.
Synchronize data between ApsaraDB for Redis instances. DTS Configure one-way data synchronization between ApsaraDB for Redis instances
Configure two-way data synchronization between ApsaraDB for Redis Enterprise Edition instances
Synchronize data between ApsaraDB for Redis cluster instances across Alibaba Cloud accounts
redis-shake Use redis-shake to synchronize data from one ApsaraDB for Redis instance to another
Synchronize data between user-created Redis databases. DTS Synchronize data from a user-created Redis database connected over Express Connect, VPN Gateway, or Smart Access Gateway to a user-created Redis database hosted on ECS