Rump is an open-source tool designed for migrating Redis data online. It supports migration between DBs of the same instance and between DBs of different instances.
Rump uses the SCAN command to acquire keys and the DUMP/RESTORE command to get or set values.
Featuring time complexity O(1), SCAN is capable of quickly getting all keys. DUMP/RESTORE is used to read/write values independent from the key type.
Rump brings the following benefits:
On 64-bit Linux, run the following command:
wget https://github.com/stickermule/rump/releases/download/0.0.3/rump-0.0.3-linux-amd64;
mv rump-0.0.3-linux-amd64 rump;
chmod +x rump;
rump -from {source_redis_address} -to {target_redis_address}
Parameter/Option description:
Source Redis instance address, in the format of redis://[user:password@]host:port/db. [user:password@] is optional. If the instance is accessed in password-protected mode, you must specify the password in the RFC 3986 format. user can be omitted, but the colon (:) cannot be omitted. For example, the address may be redis://:mypassword@192.168.0.45:6379/1.
db is the sequence number of the database. If it is not specified, the default value is 0.
Address of the target Redis instance, in the same format as the source.
In the following example, data in DB0 of the source Redis is migrated to the target Redis whose connection address is 192.168.0.153. ****** stands for the password.
[root@ecs ~]# ./rump -from redis://127.0.0.1:6379/0 -to redis://:******@192.168.0.153:6379/0 .Sync done. [root@ecs ~]#