Skip to content

MongoDB Upgrade Procedure

Felix Gabler edited this page Nov 9, 2022 · 6 revisions

! The links change depending on the MongoDB version and the operating system version !

In-Depth: https://www.mongodb.com/docs/manual/release-notes/5.0-upgrade-standalone/

Rye

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

Clone this wiki locally