-
Notifications
You must be signed in to change notification settings - Fork 14
MongoDB Upgrade Procedure
Felix Gabler edited this page Nov 9, 2022
·
6 revisions
In-Depth: https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/
Always update step by step:
- Check feature capabilities are set correctly in authenticated mongo shell
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )=> should be old version - Stop mongod:
service mongod stop - Download new mongo version into
~/mongodb/sources:wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu2004-5.0.13.tgz - Extract
tar xfz mongodb-linux-x86_64-ubuntu2004-5.0.13.tgz && rm mongodb-linux-x86_64-ubuntu2004-5.0.13.tgz - Update symlink in
~/mongodb:rm mongo && ln -s sources/mongodb-linux-x86_64-ubuntu2004-5.0.13/ mongo - Check versions of mongo and mongod with
--version - Start mongod:
service mongod start - Set new feature capabilities in authenticated mongo shell
db.adminCommand( { setFeatureCompatibilityVersion: "5.0" } ) - Check feature capabilities are set correctly in authenticated mongo shell
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )=> should be new version