阿里工具redis-shaockhttps://github.com/alibaba/RedisShake/releases
- tar包下载下来之后直接解压,重点在于修改配置文件,注意行号
1
2
3
4
5
6
7
843 source.address = 10.189.64.45:7001
44 # password of db/proxy. even if type is sentinel.
45 source.password_raw = 123456
87 target.address = 10.189.64.45:7033
88 # password of db/proxy. even if type is sentinel.
89 target.password_raw = 123456
- 执行
1
./redis-shake.linux64 -type=rump -conf=redis-shake.conf
脚本方式
由于笔者公司的redis对Keys命令做了重命名,所以没有采用上面的方式
1 | #coding=utf-8 |