redis-shake redis同步 迁移 工具使用方法 centos8

mkdir -p /home/redis/sync
cd /home/redis/sync

到这里下载最新版的

https://github.com/alibaba/RedisShake/releases/

wget xxx.tar.gz
tar xzf redis-shake-v2.0.3.tar.gz 
 cd redis-shake-v2.0.3
mkdir ./log

修改

log.file = ./log/redis-shake.log

同步的配置参考

# this is the configuration of redis-shake.
# if you have any problem, please visit https://github.com/alibaba/RedisShake/wiki/FAQ

# current configuration version, do not modify.
# 当前配置文件的版本号,请不要修改该值。
conf.version = 1

# ------------------------------------------------------
# id
id = redis-shake

# log file,日志文件,不配置将打印到stdout (e.g. /var/log/redis-shake.log )
log.file = ./log/redis-shake.log

# log level: "none", "error", "warn", "info", "debug". default is "info".
log.level = info

# pid path,进程文件存储地址(e.g. /var/run/),不配置将默认输出到执行下面,
# 注意这个是目录,真正的pid是`{pid_path}/{id}.pid`
pid_path = 

# pprof port.
system_profile = 9310
# restful port, set -1 means disable, in `restore` mode RedisShake will exit once finish restoring RDB only if this value
# is -1, otherwise, it'll wait forever.
# restful port,查看metric端口, -1表示不启用,如果是`restore`模式,只有设置为-1才会在完成RDB恢复后退出,否则会一直block。
http_profile = 9320

# parallel routines number used in RDB file syncing. default is 64.
# 启动多少个并发线程同步一个RDB文件。
parallel = 32


source.type= standalone
source.address= 172.31.61.62:6600
source.password_raw= 
target.type= standalone
target.address= 127.0.0.1:6600
target.password_raw= 

启动二进制:./redis-shake.linux -conf=redis-shake.conf -type=xxx # xxx为sync, restore, dump, decode, rump其中之一,全量+增量同步请选择sync。 mac下请使用redis-shake.darwin,windows请用redis-shake.windows.

所以最终启动命令是

./redis-shake.linux -conf=redis-shake.conf -type=sync

自启动命令

/home/ngzb/redis/sync/redis-shake-v2.0.3/redis-shake.linux -conf=/home/ngzb/redis/sync/redis-shake-v2.0.3/redis-shake.conf -type=sync
nohup /home/ngzb/redis/sync/redis-shake-v2.0.3/redis-shake.linux -conf=/home/ngzb/redis/sync/redis-shake-v2.0.3/redis-shake.conf -type=sync > /home/ngzb/redis/sync/redis-shake-v2.0.3/log/start.log &

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Redis-shake是一款基于Go语言开发的Redis数据迁移工具。它能够在不停机的情况下将Redis数据从一个节点迁移到另一个节点,支持集群、单机以及主从架构的数据迁移Redis-shake具有以下特点。 1. 快速高效:Redis-shake使用并行化的方式进行数据迁移,能够充分利用多核处理器和带宽资源,提供高性能的数据迁移速度。 2. 稳定可靠:Redis-shake经过了大规模的生产环境验证,已经得到了广泛的应用。它具备重试机制,能够自动处理网络中断等异常情况,保证数据迁移的稳定性和可靠性。 3. 灵活易用:Redis-shake支持多种数据源和数据目标的组合。它可以从Redis节点迁移到另一个Redis节点,也可以将数据迁移到其他存储系统,如MySQL、MongoDB等。同时,Redis-shake提供了丰富的配置选项,可以根据需要进行灵活配置和定制。 4. 兼容支持:Redis-shake能够兼容不同版本的Redis,包括Redis 2.x和Redis 3.x等。它支持迁移过程中的数据过滤、数据分片、数据压缩等功能,可以满足不同场景下的需求。 5. 开源免费:Redis-shake是一款开源工具,遵循Apache 2.0协议。它的源代码可以在GitHub上获取,用户可以基于其代码进行定制和扩展,且使用过程中没有任何费用。 总之,Redis-shake是一款强大且灵活的Redis数据迁移工具,通过它我们可以轻松实现Redis数据的迁移和备份等操作,同时保证数据的一致性和可靠性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值