环境:
OS:Centos 7
milvus:2.4.6
1.停掉原有的milvus
确保原有的milvusdb里有数据,方便恢复的时候验证
[root@host135 milvus]# docker compose down WARN[0000] /home/middle/milvus/docker-compose.yml: `version` is obsolete [+] Running 5/5 ? Container attu Removed 0.9s ? Container milvus-standalone Removed 11.0s ? Container milvus-etcd Removed 0.9s ? Container milvus-minio Removed 1.5s ? Network milvus Removed
2.准备新环境目录(我这里是同一台机器上,所以目录需要与原来的不一样)
[root@host135 middle]# mkdir -p /home/middle/milvus_new
3.准备docker-compose.yml文件
若能找得到原有的docker-compose.yml最好,若没有的话,可以直接从如下目录进行下载
https://github.com/milvus-io/milvus/releases/tag/v2.4.6
我这里保留有原来的 docker-compose.yml,直接使用即可
拷贝到新的部署目录
[root@host135 milvus]# cp docker-compose.yml /home/middle/milvus_new/
4.准备好milvus.yaml
因为我原来的部署是把milvus.yaml外挂到宿主机了的,所以新环境也需要准备好该文件
[root@host135 milvus]# cp milvus.yaml /home/middle/milvus_new/
5.拷贝原有的环境的 volumes 目录到新环境
[root@host135 milvus]# cp -r volumes /home/middle/milvus_new/
6.启动新环境
[root@host135 milvus_new]# cd /home/middle/milvus_new [root@host135 milvus_new]# docker compose up -d WARN[0000] /home/middle/milvus_new/docker-compose.yml: `version` is obsolete [+] Running 5/5 ? Network milvus Created 0.2s ? Container milvus-minio Started 3.1s ? Container milvus-etcd Started 3.0s ? Container milvus-standalone Started 3.4s ? Container attu Started 4.2s [root@host135 milvus_new]#
7.登录attu查看数据是否恢复
http://192.168.1.135:8000
标签:compose,Container,root,host135,模拟,volumes,new,milvdb,milvus From: https://www.cnblogs.com/hxlasky/p/18668105