标签:str roo des ash replica finish log blog get
[source] type: redis cluster servers: - 10.86.30.37:36379 [target] type: single servers: - 10.86.30.37:6389 [common] listen: 0.0.0.0:8888
/usr/local/redis-migrate-tool/src/redis-migrate-tool -c mgr.conf -d
[root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 6389 keys \* 1) "5" 2) "2" 3) "1" 4) "10" 5) "12" 6) "3" 7) "4" 8) "13" 9) "11" [root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 36379 keys \* 1) "10" 2) "11" 3) "3" [root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 36380 keys \* 1) "12" 2) "1" 3) "2" 4) "5" [root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 36381 keys \* 1) "13" 2) "4"
[root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 36379 -c 10.86.30.37:36379> set 30 30 -> Redirected to slot [9877] located at 10.86.30.37:36380 OK 10.86.30.37:36380> set 31 31 -> Redirected to slot [14004] located at 10.86.30.37:36381 OK 10.86.30.37:36381> set 32 32 -> Redirected to slot [1751] located at 10.86.30.37:36379 OK [root@10_86_30_37_10.86.30.37 redis]# redis-cli -h 10.86.30.37 -p 6389 keys \* 1) "5" 2) "30" 3) "31" 4) "2" 5) "1" 6) "10" 7) "21" 8) "12" 9) "3" 10) "4" 11) "13" 12) "32" 13) "11"
[root@10_86_30_37_10.86.30.37 redis]# /usr/local/redis-migrate-tool/src/redis-migrate-tool -c mgr.conf log -C redis_check Check job is running... Checked keys: 1000 Inconsistent value keys: 0 Inconsistent expire keys : 0 Other check error keys: 0 Checked OK keys: 1000 All keys checked OK! Check job finished, used 0.047s
[root@10_86_30_37_10.86.30.37 redis]# /usr/local/redis-migrate-tool/src/redis-migrate-tool -c mgr.conf log -C redis_testinsert Test insert job is running... Insert string keys: 200 Insert list keys : 200 Insert set keys : 200 Insert zset keys : 200 Insert hash keys : 200 Insert total keys : 1000 Correct inserted keys: 1000 Test insert job finished, used 0.417s
redis集群同步迁移方法(二):通过redis-migrate-tool实现
标签:str roo des ash replica finish log blog get
原文地址:http://www.cnblogs.com/datazhang/p/6004947.html