This topic describes how to migrate data from an ApsaraDB for Redis instance to another ApsaraDB for Redis instance across Alibaba Cloud accounts by using Data Transmission Service (DTS). DTS supports full data migration and incremental data migration. When you configure a data migration task, you can select both of the supported migration types to ensure service continuity.
Prerequisites
- The available storage space of the destination ApsaraDB for Redis instance is larger than the total size of the data in the source ApsaraDB for Redis instance.
- If the source ApsaraDB for Redis instance is of the ApsaraDB for Redis Community Edition, the engine version is 4.0 or 5.0. If the source ApsaraDB for Redis instance is of the ApsaraDB for Redis Enhanced Edition (Tair), the engine version is 5.0.
Supported source and destination databases
The following table describes the supported types of Redis databases for which you can configure one-way data migration across Alibaba Cloud accounts.
Source database | Destination database |
---|---|
|
|
Limits
Category | Description |
---|---|
Limits on the source database |
|
Other limits |
|
Special cases | If the source database is a self-managed Redis database, take note of the following
limits:
|
Migration types
Migration type | Description |
---|---|
Full data migration |
DTS migrates historical data of the required objects from the source database to the destination database. |
Incremental data migration |
After full data migration is completed, DTS migrates incremental data from the source database to the destination database. Incremental data migration allows you to ensure service continuity when you migrate data between self-managed databases. |
Commands that are supported for incremental data migration
- APPEND
- BITOP, BLPOP, BRPOP, and BRPOPLPUSH
- DECR, DECRBY, and DEL
- EVAL, EVALSHA, EXEC, EXPIRE, and EXPIREAT
- FLUSHALL and FLUSHDB
- GEOADD and GETSET
- HDEL, HINCRBY, HINCRBYFLOAT, HMSET, HSET, and HSETNX
- INCR, INCRBY, and INCRBYFLOAT
- LINSERT, LPOP, LPUSH, LPUSHX, LREM, LSET, and LTRIM
- MOVE, MSET, MSETNX, and MULTI
- PERSIST, PEXPIRE, PEXPIREAT, PFADD, PFMERGE, PSETEX, and PUBLISH
- RENAME, RENAMENX, RESTORE, RPOP, RPOPLPUSH, RPUSH, and RPUSHX
- SADD, SDIFFSTORE, SELECT, SET, SETBIT, SETEX, SETNX, SETRANGE, SINTERSTORE, SMOVE, SPOP, SREM, and SUNIONSTORE
- ZADD, ZINCRBY, ZINTERSTORE, ZREM, ZREMRANGEBYLEX, ZUNIONSTORE, ZREMRANGEBYRANK, and ZREMRANGEBYSCORE
Preparations
Use the Alibaba Cloud account that owns the source ApsaraDB for Redis instance to log on to the Alibaba Cloud Management Console. Then, create a RAM role and specify the Alibaba Cloud account that owns the destination ApsaraDB for Redis instance as a trusted account. For more information, see Configure RAM authorization for cross-account data migration and synchronization.