To ensure a smooth upgrade process, please follow the instructions below.
Note: If your current version is below 7.2.0, please follow Step 2. Otherwise, proceed with Step 1 only.
Step 1 - Upgrade Steps for 7.2.x and above
If your docker-compose.yaml file have
tagversion
aslatest
execute the bellow command for upgrade.
Code Block |
---|
docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml pull
docker exec mongodb /bin/bash -c 'mongo admin --username="${MONGO_INITDB_ROOT_USERNAME}" --password="${MONGO_INITDB_ROOT_PASSWORD}" --eval "db.shutdownServer()"'
docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml down
docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml up -d |
...
Your docker-compose.yaml file have
tagversion
as hardcoded version value like7.3.0
. modify it to your desired version before executing these commands:
Code Block |
---|
docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml pull docker exec mongodb /bin/bash -c 'mongo admin --username="${MONGO_INITDB_ROOT_USERNAME}" --password="${MONGO_INITDB_ROOT_PASSWORD}" --eval "db.shutdownServer()"' docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml down docker-compose -f /docker-compose.yaml/file/location/docker-compose.yaml up -d |
Next Step : Follow the Post Upgrade Steps
...
Only for those whose current version is below 7.2.0,
Before you continue with any latest version (> 7.2.0), it's important to update your system to version 7.2.0 first. By following these steps:
...