https://github.com/vipshop/redis-migrate-tool #仅支持redis3及以下版本
https://github.com/tanruixing88/redis-migrate-tool #基于上述版本修改,支持redis4及以上版本
依赖
yum -y install automake libtool autoconf bzip2
安装
git clone https://github.com/tanruixing88/redis-migrate-tool.git
redis-migrate-tool
autoreconf -fvi
./configure
make
cp src/redis-migrate-tool /usr/local/bin/redis-migrate-tool
也可以直接上传迁移工具
链接:https://pan.baidu.com/s/1NH0uw0-sMBcBh3M9n-X3Ww
提取码:zmiv
1、进入目标机器
编辑配置文件
配置文件示例:从redis cluster集群迁移数据到twemproxy集群
vim a.conf
[source]
type: redis cluster
servers:
- 172.24.9.79:7000
- 172.24.9.79:7001
- 172.24.9.80:7000
- 172.24.9.80:7001
- 172.24.9.81:7000
- 172.24.9.81:7001
[target]
type: twemproxy
servers:
- 172.24.10.53:8000
- 172.24.10.53:8001
- 172.24.10.54:8000
- 172.24.10.54:8001
- 172.24.10.55:8000
- 172.24.10.55:8001
[common]
listen: 0.0.0.0:8888
运行./redis-migrate-tool -c a.conf -o a.log -d
转载:https://linuxeye.com/472.html
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之家整理,本文链接:https://www.bmabk.com/index.php/post/75811.html