Upgrade Milvus Standalone with Docker Compose
This topic describes how to upgrade your Milvus using Docker Compose.
In normal cases, you can upgrade Milvus by changing its image. However, you need to migrate the metadata before any upgrade from v2.1.x to v2.4.12.
Due to security concerns, Milvus upgrades its MinIO to RELEASE.2023-03-20T20-16-18Z with the release of v2.2.5. Before any upgrades from previous Milvus Standalone releases installed using Docker Compose, you should create a Single-Node Single-Drive MinIO deployment and migrate existing MinIO settings and content to the new deployment. For details, refer to this guide.
Upgrade Milvus by changing its image
In normal cases, you can upgrade Milvus as follows:
Change the Milvus image tag in
docker-compose.yaml
.... standalone: container_name: milvus-standalone image: milvusdb/milvus:v2.4.12
Run the following commands to perform the upgrade.
docker compose down docker compose up -d
Migrate the metadata
Stop all Milvus components.
docker stop <milvus-component-docker-container-name>
Prepare the configuration file
migration.yaml
for meta migration.# migration.yaml cmd: # Option: run/backup/rollback type: run runWithBackup: true config: sourceVersion: 2.1.4 # Specify your milvus version targetVersion: 2.4.12 backupFilePath: /tmp/migration.bak metastore: type: etcd etcd: endpoints: - milvus-etcd:2379 # Use the etcd container name rootPath: by-dev # The root path where data is stored in etcd metaSubPath: meta kvSubPath: kv
Run the migration container.
# Suppose your docker-compose run with the default milvus network, # and you put migration.yaml in the same directory with docker-compose.yaml. docker run --rm -it --network milvus -v $(pwd)/migration.yaml:/milvus/configs/migration.yaml milvusdb/meta-migration:v2.2.0 /milvus/bin/meta-migration -config=/milvus/configs/migration.yaml
Start Milvus components again with the new Milvus image.
// Run the following only after update the milvus image tag in the docker-compose.yaml docker compose down docker compose up -d
What’s next
- You might also want to learn how to:
- If you are ready to deploy your cluster on clouds:
- Learn how to Deploy Milvus on Amazon EKS with Terraform
- Learn how to Deploy Milvus Cluster on GCP with Kubernetes
- Learn how to Deploy Milvus on Microsoft Azure With Kubernetes