milvus-logo

Upgrade Milvus Standalone with Docker Compose

A major change in Milvus 2.2 is the meta structure of segment indexes. This topic describes how to use Docker Compose to migrate the meta and upgrade Milvus from v2.1.x to v2.2.0.

Upgrade Milvus from v2.1.x to v2.2.0

  1. Stop all Milvus components.
docker stop <milvus-component-docker-container-name>
  1. 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.2.0
  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
  1. 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
  1. Start Milvus components again with the new Milvus image.
Update the milvus image tag in the docker-compose.yaml
docker-compose down
docker-compose up -d

What's next

On this page