Redis Shake

Roit supports almost all Redis migration scenarios except for cloud database Redis cluster mode. Therefore, you can use the RedisShake tool to support full migration of Alibaba Cloud Redis clusters, but incremental migration is not supported.

Redis-shake

This tool has three modes: restore, sync, and scan:

  1. Restore Mode is always used to restore RDB files.
  2. Sync Mode supports both full and incremental synchronization. This mode is based on sync and psync replication. If your Redis is a cloud service product, commands might be Disabled, making this mode ineffective.
  3. Scan Mode supports only full synchronization.


Download Redis-shake

Download the Redis-shake binary file from GitHub: https://github.com/alibaba/RedisShake/releases

Compile from Source

1apt install golang
2git clone https://github.com/alibaba/RedisShake
3cd RedisShake
4bash build.sh

Potential Issues

If you encounter build errors, you can manually download the binary package or use an accessible proxy.

Example error:

1proxyconnect tcp: dial tcp 47.242.92.102:8788: i/o timeout

Edit Configuration File

TIPS

You can edit the sync.tomlrestore.toml or scan.toml files.

Modify scan.toml:

1type = "scan"
2
3[source]
4version = 6.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...
5address = "127.0.0.1:6379"
6username = "" # keep empty if not using ACL
7password = "" # keep empty if no authentication is required
8tls = false
9
10[target]
11type = "cluster" # "standalone" or "cluster"
12version = 6.0 # redis version, such as 2.8, 4.0, 5.0, 6.0, 6.2, 7.0, ...
13# When the target is a cluster, write the address of one of the nodes.
14# redis-shake will obtain other nodes through the `cluster nodes` command.
15address = "127.0.0.1:6380"
16username = "" # keep empty if not using ACL
17password = "" # keep empty if no authentication is required
18tls = false

Start redis-shake

1./bin/redis-shake redis-shake.toml
2# or
3./bin/redis-shake restore.toml
4or
5./bin/redis-shake scan.toml