源码地址:
https://github.com/vipshop/redis-migrate-tool/tree/master
1 git clone 到192.168.1.119上/usr/local/src/
git clone https://github.com/vipshop/redis-migrate-tool.git
cd redis-migrate-tool
$ autoreconf -fvi$ ./configure$ make$ src/redis-migrate-tool -h3
#从redis cluster集群迁移数据到另外一个cluster集群
[source]
type: redis cluster
servers:
- 127.0.0.1:8379
[target]
type: redis cluster
servers:
- 127.0.0.1:7379
[common]
listen: 0.0.0.0:8888
#从rdb文件恢复数据到redis cluster集群
[source]
type: rdb file
servers:
- /data/redis/dump1.rdb
- /data/redis/dump2.rdb
- /data/redis/dump3.rdb
[target]
type: redis cluster
servers:
- 127.0.0.1:7379
[common]
listen: 0.0.0.0:8888
4 软件运行
src/redis-migrate-tool -c rmt.conf -o log -d
5 状态查看:通过redis-cli连接redis-migrate-tool监控的端口,运行info命令
$redis-cli -h 127.0.0.1 -p 8888127.0.0.1:8888> info6 数据校验
src/redis-migrate-tool -c rmt.conf -o log -C redis_check