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 &

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值