Skip to content

Mongodb upgrade standalone

โฌ†๏ธ MongoDB Standalone Upgrade: v6 โžก๏ธ v7ยถ

This guide covers the steps and best practices for upgrading MongoDB from version 6 to version 7 in a standalone setup.


๐Ÿ”ง Enable Feature Compatibilityยถ

Set the featureCompatibilityVersion to support the new version:

db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
db.adminCommand( { setFeatureCompatibilityVersion: "7.0", confirm: true } )

๐Ÿš€ Update ArgoCD Applicationยถ

Update your ArgoCD chart reference for MongoDB:

  - repoURL: registry-1.docker.io/bitnamicharts
    chart: mongodb
    targetRevision: 16.5.21

๐Ÿ’พ Backup MongoDB Dataยถ

mongodump --uri="mongodb://localhost:27017/" --out=./atnt-poc.md

Info

Always backup your data before performing upgrades and verify compatibility settings to avoid issues.

โฌ† Upgrade MongoDB with Helmยถ

helm upgrade mongodb --namespace mongodb ./ 
helm upgrade mongodb -n mongodb bitnami/mongodb --version 16.5.21 -f values.yaml