-
Notifications
You must be signed in to change notification settings - Fork 0
Home
songyuyuyu edited this page Oct 29, 2021
·
12 revisions
- 需要提前启动docker进程,且支持docker-compose
- 新建一个路径,在该路径下启动(建议)
- 数据复制
测试master中数据是否能同步到备机房redis
-
随机进入一台redis容器
-
连接主机房master redis 并添加数据后退出
docker exec -ti redis-6379 bash
-
连接主机房master redis 并添加数据后退出
redis-cli -h 172.19.0.10 set test1 12345
-
连接备机房slave redis 获取数据成功后退出
redis-cli -h 172.19.0.13 get test1
-
例子
song@ubuntu:~/yusong/code/test$ docker exec -ti redis-6379 bash
root@c568933bae57:/data# redis-cli -h 172.19.0.10
172.19.0.10:6379> set test1 12345
OK
172.19.0.10:6379> exit
root@c568933bae57:/data# redis-cli -h 172.19.0.13
172.19.0.13:6379> get test1
"12345"
172.19.0.13:6379> exit
- 迁移功能
- 在cluster_list页面找到该cluster,点击迁移
- 选择待迁移cluster和目标机房
- 执行迁移
- 查看迁移是否成功
执行命令:docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ctripcorpxpipe/xpipe-proxy 1.0 2482005982e4 6 days ago 748MB
ctripcorpxpipe/xpipe-keeper 1.0 b8672c15c8de 6 days ago 734MB
ctripcorpxpipe/xpipe-console 1.0 62e4ed6d4710 6 days ago 734MB
ctripcorpxpipe/xpipe-mysql 2.0 aed556dd9bd5 2 weeks ago 448MB