ApsaraDB for Redis provides multiple data migration solutions based on Data Transmission Service (DTS) and redis-shake. This allows 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 minimal 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 in ApsaraDB for Redis instances. For scenarios in which DTS is not suitable, 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 migrate data between different database types and architectures described in the following table. For example, you can use DTS to migrate data from a self-managed Redis database in the master-replica architecture to an ApsaraDB for Redis Community Edition instance in the cluster architecture.
  • The data synchronization feature of DTS is suitable for more data synchronization scenarios. We recommend that you use the data synchronization feature of DTS to migrate data. For more information, see Overview.
Table 1. Differences
Tool Supported source database Supported destination database Supported architecture Supported migration type
DTS (recommended)
  • Self-managed Redis database

    Redis 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Redis 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)
  • ApsaraDB for Redis Community Edition

    Redis 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)
  • Full data migration
  • Incremental data migration
  • Cross-account data migration
Redis-shake
  • Self-managed Redis database

    Redis 2.8, 3.0, 3.2, 4.0, and 5.0

  • ApsaraDB for Redis Community Edition

    Redis 4.0 and 5.0

  • ApsaraDB for Redis Enhanced Edition (Tair)

    Redis 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 configure data migration, you must obtain the required permissions on the source and destination databases based on the migration scenarios. The following table describes the required permissions.

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 ApsaraDB for Redis instances that belong to the same Alibaba Cloud account
  • Migrate data between ApsaraDB for Redis instances that belong to different Alibaba Cloud accounts
Replication permissions
Note You cannot create an account that has replication permissions for the source instance in the cluster or read/write splitting architecture. If the destination instance is an ApsaraDB for Redis instance, you can submit a ticket to eliminate the limit.
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.
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 self-managed 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-shake 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 the data of a self-managed Redis database from a backup file to an ApsaraDB for Redis instance
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 an ApsaraDB for Redis instance 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