修改日志存储位置
log file,日志文件,不配置将打印到stdout (e.g. /var/log/redis-shake.log )
log.file =/opt/shake/logs/redis-shake.log
配置原redis库
source.address = 10.10.12.41:6379
密码没有为空 有则填写
source.password_raw =
source r
《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》
【docs.qq.com/doc/DSmxTbFJ1cmN1R2dB】 完整内容开源分享
edis configuration.
used in dump, sync and rump.
source redis type, e.g. “standalone” (default), “sentinel” or “cluster”.
1. “standalone”: standalone db mode.
2. “sentinel”: the redis address is read from sentinel.
3. “cluster”: the source redis has several db.
4. “proxy”: the proxy address, currently, only used in “rump” mode.
源端redis的类型,支持standalone,sentinel,cluster和proxy四种模式,注意:目前proxy只用于rump模式。
source.type = standalone
ip:port
the source address can be the following:
1. single db address. for “standalone” type.
2. s e n t i n e l m a s t e r n a m e : {sentinel_master_name}:sentinelmastername:{master or slave}@sentinel single/cluster address, e.g., mymaster:master@127.0.0.1:26379;127.0.0.1:26380, or @127.0.0.1:26379;127.0.0.1:26380. for “sentinel” type.
3. cluster that has several db nodes split by semicolon(?. for “cluster” type. e.g., 10.1.1.1:20331;10.1.1.2:20441.
4. proxy address(used in “rump” mode only). for “proxy” type.
源redis地址。对于sentinel或者开源cluster模式,输入格式为"master名字:拉取角色为master或者slave@sentinel的地址",别的cluster
架构,比如codis, twemproxy, aliyun proxy等需要配置所有master或者slave的db地址。
source.address = 10.10.12.41:6379
password of db/proxy. even if type is sentinel.
source.password_raw =
auth type, don’t modify it
source.auth_type = auth
tls enable, true or false. Currently, only support standalone.
open source redis does NOT support tls so far, but some cloud versions do.
source.tls_enable = false
input RDB file.
used in decode and restore.
if the input is list split by semicolon(?, redis-shake will restore the list one by one.
如果是decode或者restore,这个参数表示读取的rdb文件。支持输入列表,例如:rdb.0;rdb.1;rdb.2
redis-shake将会挨个进行恢复。
source.rdb.input = local
the concurrence of RDB syncing, default is len(source.address) or len(source.rdb.input).
used in dump, sync and restore. 0 means default.
This is useless when source.type isn’t cluster or only input is only one RDB.
拉取的并发度,如果是dump或者sync,默认是source.address中db的个数,restore模式默认len(source.rdb.input)。
假如db节点/输入的rdb有5个,但rdb.parallel=3,那么一次只会
并发拉取3个db的全量数据,直到某个db的rdb拉取完毕并进入增量,才会拉取第4个db节点的rdb,
以此类推,最后会有len(source.address)或者len(rdb.input)个增量线程同时存在。
source.rdb.parallel = 0
for special cloud vendor: ucloud
used in decode and restore.
ucloud集群版的rdb文件添加了slot前缀,进行特判剥离: ucloud_cluster。
source.rdb.special_cloud =
迁移目标库配置
配置原redis库
source.address = 10.10.12.42:6380
密码没有为空 有则填写
source.password_raw =
# 当源目的有重复key,是否进行覆写
# rewrite表示源端覆盖目的端。
# none表示一旦发生进程直接退出。
# ignore表示保留目的端key,忽略源端的同步key。该值在rump模式下没有用。
#默认none
#该值在rump模式下没有用。
key_exists = rewrite
target redis configuration. used in restore, sync and rump.
the type of target redis can be “standalone”, “proxy” or “cluster”.
1. “standalone”: standalone db mode.
2. “sentinel”: the redis address is read from sentinel.
3. “cluster”: open source cluster (not supported currently).
4. “proxy”: proxy layer ahead redis. Data will be inserted in a round-robin way if more than 1 proxy given.
目的redis的类型,支持standalone,sentinel,cluster和proxy四种模式。
target.type = standalone
ip:port
the target address can be the following:
1. single db address. for “standalone” type.
2. s e n t i n e l m a s t e r n a m e : {sentinel_master_name}:sentinelmastername:{master or slave}@sentinel single/cluster address, e.g., mymaster:master@127.0.0.1:26379;127.0.0.1:26380, or @127.0.0.1:26379;127.0.0.1:26380. for “sentinel” type.
3. cluster that has several db nodes split by semicolon(?. for “cluster” type.
4. proxy address. for “proxy” type.
target.address = 10.10.12.42:6380
password of db/proxy. even if type is sentinel.
target.password_raw =
auth type, don’t modify it
target.auth_type = auth
all the data will be written into this db. < 0 means disable.
target.db = -1
tls enable, true or false. Currently, only support standalone.
open source redis does NOT support tls so far, but some cloud versions do.
target.tls_enable = false