使用redis-shake迁移redis cluster实操
使用参考:https://help.aliyun.com/knowledge_detail/111066.html
校验工具:redis-full-check 版本1.4.8
使用参考:https://help.aliyun.com/document_detail/116887.html?spm=a2c4g.11186623.2.16.2d245d3eAoHLGq#concept-221787
源redis cluster 版本3.2.0,目标redis cluster 版本3.2.0
[STG-rmytest01_C00:rd01:5717:M ~]$./redis-shake.linux -conf=redis-shake.conf -type=sync
测试步骤与配置信息
[STG-rmytest01_C00:rd01:5717:M ~]$cat redis-shake.conf
#conf.version = 1
id = redis-shake
log.file =/u/redis/home/redis/hzy/redis-shake-v1.6.28/redis-shake.log
log.level = info
pid_path =/u/redis/home/redis/hzy/redis-shake-v1.6.28/redis-shake.pid
system_profile = 9310
http_profile = 9320
parallel = 32
source.type = cluster
#可使用以下命令,获取源或目标ip 端口
#redis-cli -p 5717 -a pass1234 cluster nodes |awk "{print $2}" |awk -F "@" "{print $1}" |awk -F":" "{print $1 ":"$2 }" |tr "
" ";"
#说明: -type=sync 在sync模式下,redis-shake使用SYNC或PSYNC命令将数据从源端Redis同步到目的端Redis,支持全量数据同步和增量数据同步,增量同步#在全量同步完成后自动开始
source.address = 192.168.0.100:5719;192.168.0.101:5718;192.168.0.100:5723;192.168.0.100:5721;192.168.0.101:5720;192.168.0.101:5722;192.168.0.100:5717
source.password_raw = world5555
source.auth_type = auth
source.tls_enable = false
source.rdb.input = local
source.rdb.parallel = 0
#source.rdb.special_cloud =
target.type = cluster
target.address = 192.168.1.1:5970;192.168.1.2:5971;192.168.1.3:5972
target.password_raw = word1234
target.auth_type = auth
target.db = -1 #cluster 模式下不支持select 0 ,所以这里指定具体的db 会报错
target.tls_enable = false
target.rdb.output = local_dump
target.version = 4.0.10
#fake_time =
rewrite = true
#filter.db.whitelist =
#filter.db.blacklist =
#filter.key.whitelist =
#filter.key.blacklist =
#filter.slot =""
filter.lua = false
big_key_threshold = 524288000
metric = true
metric.print_log = false
sender.size = 104857600
sender.count = 4095
sender.delay_channel_size = 65535
keep_alive = 0
scan.key_number = 50
#scan.special_cloud =
#scan.key_file =
qps = 200000
#resume_from_break_point = false
replace_hash_tag = false
[STG-rmytest01_C00:rd01:5717:M ~]$
[redis@rd01 redis-shake-v1.6.28]$ less redis-shake-2020-05-08T08-52-47.257.log
2020/05/08 16:41:14 [WARN] source.auth_type[auth] != auth
2020/05/08 16:41:14 [WARN] target.auth_type[auth] != auth
2020/05/08 16:41:14 [INFO] the target redis type is cluster, only pass db0
2020/05/08 16:41:14 [WARN] target version[4.0.10] given, set big_key_threshold = 1. see #173%!(EXTRA string=)
2020/05/08 16:41:14 [WARN]
______________________________
_ ______ |
/ \___-=O"/|O"/__|
RedisShake, here we go !! \_______ / | / )
/ / "/-==__ _/__|/__=-| -GM
/ Alibaba Cloud / * | |
/ / (o)
------------------------------
if you have any problem, please visit https://github.com/alibaba/RedisShake/wiki/FAQ
2020/05/08 16:41:14 [INFO] redis-shake configuration: {"Id":"redis-shake","LogFile":"/u/redis/home/redis/hzy/redis-shake-v1.6.28/redis-shake.log","LogLevel":"info","SystemProfile":9310,"HttpProfile":9320,"Parallel":32,"SourceType":"cluster","SourceAddress":"192.168.0.100:5719;192.168.0.101:5718;192.168.0.100:5723;192.168.0.100:5721;192.168.0.101:5720;192.168.0.101:5722;192.168.0.100:5717","SourcePasswordRaw":"fY1_6f.Psv","SourcePasswordEncoding":"","SourceAuthType":"auth","SourceTLSEnable":false,"SourceRdbInput":["local"],"SourceRdbParallel":7,"SourceRdbSpecialCloud":"","TargetAddress":"30.10.0.77:5970;30.10.0.248:5971;30.10.0.77:5972","TargetPasswordRaw":"bO16t~.Vxp","TargetPasswordEncoding":"","TargetDBString":"-1","TargetAuthType":"auth","TargetType":"cluster","TargetTLSEnable":false,"TargetRdbOutput":"local_dump","TargetVersion":"4.0.10","FakeTime":"","KeyExists":"rewrite","FilterDBWhitelist":["0"],"FilterDBBlacklist":[],"FilterKeyWhitelist":null,"FilterKeyBlacklist":null,"FilterSlot":null,"FilterLua":false,"BigKeyThreshold":1,"Psync":false,"Metric":true,"MetricPrintLog":false,"SenderSize":104857600,"SenderCount":4095,"SenderDelayChannelSize":65535,"KeepAlive":0,"PidPath":"/u/redis/home/redis/hzy/redis-shake-v1.6.28/redis-shake.pid","ScanKeyNumber":50,"ScanSpecialCloud":"","ScanKeyFile":"","Qps":200000,"NCpu":0,"HeartbeatUrl":"","HeartbeatInterval":10,"HeartbeatExternal":"","HeartbeatNetworkInterface":"","ReplaceHashTag":false,"ExtraInfo":false,"SockFileName":"","SockFileSize":0,"FilterKey":null,"FilterDB":"","Rewrite":true,"SourceAddressList":["192.168.0.100:5719","192.168.0.101:5718","192.168.0.100:5723","192.168.0.100:5721","192.168.0.101:5720","192.168.0.101:5722","192.168.0.100:5717"],"TargetAddressList":["30.10.0.77:5970","30.10.0.248:5971","30.10.0.77:5972"],"SourceVersion":"4.0.10","HeartbeatIp":"127.0.0.1","ShiftTime":0,"TargetReplace":true,"TargetDB":-1,"Version":"improve-1.6.28,ee2b853354b0cbaad2829d041ea72e106b2f46ec,go1.10.3,2020-04-21_13:17:55","Type":"sync"}
2020/05/08 16:41:14 [INFO] routine[0] starts syncing data from 192.168.0.100:5719 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[2] starts syncing data from 192.168.0.100:5723 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[1] starts syncing data from 192.168.0.101:5718 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[3] starts syncing data from 192.168.0.100:5721 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[4] starts syncing data from 192.168.0.101:5720 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[6] starts syncing data from 192.168.0.100:5717 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] routine[5] starts syncing data from 192.168.0.101:5722 to [30.10.0.77:5970 30.10.0.248:5971 30.10.0.77:5972] with http[9327]
2020/05/08 16:41:14 [INFO] dbSyncer[3] rdb file size = 58452
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72869304
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:a7cf158b627a74d41273c39f01f531ff74a919b8
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:136 expire_size:136
2020/05/08 16:41:14 [INFO] dbSyncer[5] rdb file size = 46583
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72692584
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:a8695cff787a9e644cac6f4e28598868fa6b9f36
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
...skipping...
2020/05/08 16:41:14 [INFO] dbSyncer[3] sync rdb done
2020/05/08 16:41:14 [INFO] Aux information key:lua value:if redis.call("get",KEYS[1]) == ARGV[1]
then
return redis.call("del",KEYS[1])
else
return 0
end
2020/05/08 16:41:14 [INFO] dbSyncer[5] total = 45.491KB - 45.491KB [100%] entry=115
2020/05/08 16:41:14 [WARN] dbSyncer[3] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[5] sync rdb done
2020/05/08 16:41:14 [INFO] dbSyncer[3] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [WARN] dbSyncer[5] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[5] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [INFO] dbSyncer[0] rdb file size = 76875
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72795264
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:d3cb9c14f46128be69e023fa244437b3d5236cf3
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:146 expire_size:144
2020/05/08 16:41:14 [INFO] dbSyncer[6] rdb file size = 39889
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72723304
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:832caebe279fee74c07e7f3de74f7a2ecf38cece
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:113 expire_size:110
2020/05/08 16:41:14 [INFO] dbSyncer[1] rdb file size = 52446
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72974984
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:204bcc5426c073045fb23e2238a799f254bb3e68
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:124 expire_size:123
2020/05/08 16:41:14 [INFO] Aux information key:lua value:if redis.call("get",KEYS[1]) == ARGV[1]
then
return redis.call("del",KEYS[1])
else
return 0
end
2020/05/08 16:41:14 [INFO] dbSyncer[4] rdb file size = 43693
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72694296
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:526c738d267cb69a7eb613dae2bb49f491f273d0
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:128 expire_size:128
2020/05/08 16:41:14 [INFO] Aux information key:lua value:if redis.call("get",KEYS[1]) == ARGV[1]
...skipping...
2020/05/08 16:41:14 [INFO] dbSyncer[6] sync rdb done
2020/05/08 16:41:14 [INFO] dbSyncer[4] total = 42.669KB - 42.669KB [100%] entry=129
2020/05/08 16:41:14 [INFO] dbSyncer[4] sync rdb done
2020/05/08 16:41:14 [INFO] dbSyncer[6] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [WARN] dbSyncer[6] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[1] total = 51.217KB - 51.217KB [100%] entry=125
2020/05/08 16:41:14 [INFO] dbSyncer[1] sync rdb done
2020/05/08 16:41:14 [INFO] dbSyncer[4] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [WARN] dbSyncer[4] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[1] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [WARN] dbSyncer[1] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[0] total = 75.073KB - 75.073KB [100%] entry=146
2020/05/08 16:41:14 [INFO] dbSyncer[0] sync rdb done
2020/05/08 16:41:14 [INFO] dbSyncer[0] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:14 [WARN] dbSyncer[0] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[2] rdb file size = 43062
2020/05/08 16:41:14 [INFO] Aux information key:redis-ver value:4.0.10
2020/05/08 16:41:14 [INFO] Aux information key:redis-bits value:64
2020/05/08 16:41:14 [INFO] Aux information key:ctime value:1588927274
2020/05/08 16:41:14 [INFO] Aux information key:used-mem value:72775184
2020/05/08 16:41:14 [INFO] Aux information key:repl-stream-db value:0
2020/05/08 16:41:14 [INFO] Aux information key:repl-id value:86726928fcc7bbccc46ccc67cd98c8cc96273c81
2020/05/08 16:41:14 [INFO] Aux information key:repl-offset value:0
2020/05/08 16:41:14 [INFO] Aux information key:aof-preamble value:0
2020/05/08 16:41:14 [INFO] db_size:125 expire_size:121
2020/05/08 16:41:14 [INFO] dbSyncer[2] total = 42.053KB - 42.053KB [100%] entry=125
2020/05/08 16:41:14 [INFO] dbSyncer[2] sync rdb done
2020/05/08 16:41:14 [WARN] dbSyncer[2] GetFakeSlaveOffset not enable when psync == false
2020/05/08 16:41:14 [INFO] dbSyncer[2] FlushEvent:IncrSyncStart Id:redis-shake
2020/05/08 16:41:15 [INFO] dbSyncer[3] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[5] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[6] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[4] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[1] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[0] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:15 [INFO] dbSyncer[2] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:16 [INFO] dbSyncer[3] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:16 [INFO] dbSyncer[5] sync: +forwardCommands=1 +filterCommands=0 +writeBytes=4
2020/05/08 16:41:16 [INFO] dbSyncer[6] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:16 [INFO] dbSyncer[4] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:16 [INFO] dbSyncer[1] sync: +forwardCommands=1 +filterCommands=0 +writeBytes=4
2020/05/08 16:41:16 [INFO] dbSyncer[0] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:16 [INFO] dbSyncer[2] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[3] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[5] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[6] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[4] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[1] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[0] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:17 [INFO] dbSyncer[2] sync: +forwardCommands=1 +filterCommands=0 +writeBytes=4
2020/05/08 16:41:18 [INFO] dbSyncer[3] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[5] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[6] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[4] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[1] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[0] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
2020/05/08 16:41:18 [INFO] dbSyncer[2] sync: +forwardCommands=0 +filterCommands=0 +writeBytes=0
[redis@rd01 redis-shake-v1.6.28]$
"
---------------------
--校验:
--./redis-full-check -s "
./redis-full-check -s "192.168.0.100:5719;192.168.0.101:5718;192.168.0.100:5723;192.168.0.100:5721;192.168.0.101:5720;192.168.0.101:5722;192.168.0.100:5717"
-p world5555
-t "192.168.1.1:5970;192.168.1.2:5971;192.168.1.3:5972"
-a word1234
--comparemode=1
--comparetimes=1
--qps=10 --batchcount=100
--sourcedbtype=1 --targetdbfilterlist=0 --targetdbtype=1
[STG-rmytest01_C00:rd01:5717:M ~]$./redis-full-check -s "192.168.0.100:5719;192.168.0.101:5718;192.168.0.100:5723;192.168.0.100:5721;192.168.0.101:5720;192.168.0.101:5722;192.168.0.100:5717" -p fY1_6f.Psv -t "30.10.0.77:5970;30.10.0.248:5971;30.10.0.77:5972" -a bO16t~.Vxp --comparemode=1 --comparetimes=1 --qps=10 --batchcount=100 --sourcedbtype=1 --targetdbfilterlist=0 --targetdbtype=1
[INFO 2020-05-08-17:42:41 main.go:65]: init log success
[INFO 2020-05-08-17:42:41 main.go:168]: configuration: {192.168.0.100:5719;192.168.0.101:5718;192.168.0.100:5723;192.168.0.100:5721;192.168.0.101:5720;192.168.0.101:5722;192.168.0.100:5717 fY1_6f.Psv auth 1 -1 30.10.0.77:5970;30.10.0.248:5971;30.10.0.77:5972 bO16t~.Vxp auth 1 0 result.db 1 1 unknown unknown unknown 10 5 100 5 false 16384 20445 false}
[INFO 2020-05-08-17:42:41 main.go:170]: ---------
[INFO 2020-05-08-17:42:41 full_check.go:238]: sourceDbType=1, p.sourcePhysicalDBList=[192.168.0.100:5719 192.168.0.101:5718 192.168.0.100:5723 192.168.0.100:5721 192.168.0.101:5720 192.168.0.101:5722 192.168.0.100:5717]
[INFO 2020-05-08-17:42:41 full_check.go:241]: db=0:keys=0(inaccurate for type cluster)
[INFO 2020-05-08-17:42:41 full_check.go:253]: ---------------- start 1th time compare
[INFO 2020-05-08-17:42:41 full_check.go:278]: start compare db 0
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.100:5717]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.100:5723]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.101:5718]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.101:5720]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.100:5721]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.101:5722]]
[INFO 2020-05-08-17:42:41 scan.go:20]: build connection[source redis addr: [192.168.0.100:5719]]
[INFO 2020-05-08-17:42:42 full_check.go:203]: stat:
times:1, db:0, dbkeys:0, finish:-1%, finished:true
KeyScan:{881 881 0}
KeyEqualAtLast|string|equal|{818 818 0}
KeyEqualAtLast|list|equal|{1 1 0}
KeyConflictAtLast|string|value|{3 3 0}
KeyConflictAtLast|string|lack_target|{59 59 0}
[INFO 2020-05-08-17:42:42 full_check.go:328]: --------------- finished! ----------------
all finish successfully, totally 62 key(s) and 0 field(s) conflict--- 说明 执行完成后命令行输出校对结论,下方示例表示有62个不一致的key。如果此处为0,则两端数据一致。因为是在已有环境中测试,测试前已有数据。
[STG-rmytest01_C00:rd01:5717:M ~]$
至此迁移完成。
校验说明:校验时配置的群集源与目标ip 必须是master 节点,不能配置slave 节点如何节点很多,可以使用以下配置方式,以简化配置
./redis-full-check -s "master@192.168.0.100:6979" -p world5555-t "master@192.168.1.1:6475" -a word1234--comparemode=1 --comparetimes=1 --qps=100 --batchcount=1000 --sourcedbtype=1 --targetdbfilterlist=0 --targetdbtype=1 >check.log &
ps:redis 迁移 工具对比
name | 支持情况 | 是否开源 | check 一致性 | 功能 | 参考说明 |
redis-migrate-tool | 备份, 全量同步 增量 |
是 | 支持 | redis到cluster cluster集群到cluster集群迁移 cluster到twemproxy的迁移 从AOF 和 RDB中恢复数据 |
https://blog.csdn.net/singgel/article/details/94596464 https://github.com/vipshop/redis-migrate-tool |
redis-shake | 备份, 全量同步 增量 |
是 | 单独的check工具 | 单节点->单节点 单节点->cluster cluster->cluster cluster->单节点 |
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341