赞
踩
源实例:127.0.0.1:7000
目标实例:127.0.0.1:8000
127.0.0.1:7000 中有k1-k100,一共100个key;
step1,redis 7000执行bgsave,保存数据
- standalone]# redis-cli -h 127.0.0.1 -p 7000 bgsave
- Background saving started
step2, 拷贝7000.rdb 为8000.rdb
standalone]# cp 7000.rdb 8000.rdb
step3, 启动8000.rdb
standalone]# redis-server 8000.conf
step4 验证redis 800中的key
- standalone]# redis-cli -h 127.0.0.1 -p 8000 keys "*"
- 1) "k10"
- 2) "k4"
- 3) "k45"
- 4) "k64"
- 5) "k67"
- 6) "k13"
- 7) "k97"
- 8) "k90"
- 9) "k43"
- 10) "k39"
- 11) "k68"
- 12) "k3"
- 13) "k29"
- 14) "k26"
迁移完毕
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。