ApsaraDB for Redis provides multiple solutions for data migration. These solutions use Data Transmission Service (DTS) and redis-shake. The solutions allow you to migrate data in different scenarios based on your business requirements.

Data migration tools

  • DTS (recommended)

    DTS is a real-time data streaming service that is provided by Alibaba Cloud. The service allows you to migrate, subscribe to, and synchronize data by using stable and secure transmission channels. DTS supports full data migration and incremental data migration with minimum downtime. This ensures service availability.

  • Redis-shake

    Redis-shake is an open source Linux-based tool that is developed by Alibaba Cloud. You can use this tool to parse (decode mode), restore (restore mode), back up (dump mode), and synchronize (sync or rump mode) data on ApsaraDB for Redis instances. If DTS is unavailable, you can use redis-shake to migrate data.

The following table describes the differences between DTS and redis-shake for Redis data migration.

Note
  • You can use different databases and architectures that are listed in the following table in data migration. For example, you can use DTS to migrate data from a self-managed Redis database with a master-replica architecture to a cluster instance of ApsaraDB for Redis Community Edition.
  • The data synchronization feature of DTS is also suitable for other data synchronization scenarios. We recommend that you use the data synchronization feature of DTS to migrate data. For more information, see Overview of data synchronization.
Table 1. Support for data migration
Tool Supported source database Supported destination database Supported architecture Supported migration type
DTS (recommended)

Self-managed Redis database

Versions 2.8, 3.0, 3.2, 4.0, and 5.0

  • Self-managed Redis database

    Versions 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

  • Full data migration
  • Incremental data migration
Redis-shake
  • Self-managed Redis database

    Versions 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Version 4.0 and 5.0

  • Self-managed Redis database

    Versions 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

The source and destination databases support the following architectures:
  • Full data migration
  • Incremental data migration

Required permissions

The permissions that are required by DTS and redis-shake vary based on different migration scenarios. Before you migrate data, make sure that the required permissions are granted on the source and destination databases based on the 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 required permissions to the account, see Create and manage database accounts.
Tool Scenario Permission on the source database Permission on the destination database
DTS (recommended)
  • Migrate data from a self-managed Redis database to an ApsaraDB for Redis instance
  • Migrate data between self-managed databases
Permissions to run the SYNC or PSYNC command. Read and write permissions
Redis-shake
  • Migrate data from a self-managed Redis database to an ApsaraDB for Redis instance
  • Migrate data between self-managed databases
Permissions to run the SYNC or PSYNC command. Read and write permissions
  • Migrate data between instances that belong to the same Alibaba Cloud account
  • Migrate data across Alibaba Cloud accounts
Replication permissions
Note If the source database is a cluster instance or read/write splitting instance, you cannot create an account that is granted the replication permissions. If the destination database is an ApsaraDB for Redis instance, you can submit a ticket to create an account that has the replication permissions.
Read and write permissions

Data migration solutions

Notice If your migration scenario is not included in the following table, we recommend that you use the data synchronization feature of DTS to migrate data because this feature is more frequently used to migrate Redis data. For more information, see Overview of data synchronization.
Table 2. Migration solutions
Scenario Tool Solution
Migrate data from a self-managed Redis database to an ApsaraDB for Redis instance DTS Migrate data from a user-created Redis database to an ApsaraDB for Redis instance
Synchronize data from a Codis cluster hosted on ECS to an ApsaraDB for Redis instance
Note This solution uses the data synchronization feature of DTS to migrate data.
Synchronize data from a Twemproxy Redis cluster hosted on ECS to an ApsaraDB for Redis instance
Note This solution uses the data synchronization feature of DTS to migrate data.
Redis-shake Use redis-shak to migrate data from a self-managed Redis database to Alibaba Cloud
Use redis-shake to migrate data from on-premises Codis or Redis to ApsaraDB for Redis
Use redis-shake to migrate data from an RDB file
Use AOF files to migrate data
Migrate data between ApsaraDB for Redis instances DTS Synchronize data in one direction between ApsaraDB for Redis instances
Note This solution uses the data synchronization feature of DTS to migrate data.
Redis-shake Migrate data between ApsaraDB for Redis instances by using Redis-shake
Migrate data from a third-party database to ApsaraDB for Redis Redis-shake Migrate data from Amazon ElastiCache for Redis to ApsaraDB for Redis
Migrate data from SSDB to ApsaraDB for Redis
Migrate data from Google Cloud Memorystore for Redis to ApsaraDB for Redis