Skip to content

MongoDB Upgrade Procedure

Felix Gabler edited this page Aug 30, 2020 · 6 revisions

In-Depth: https://docs.mongodb.com/manual/release-notes/4.4-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
  • Download new mongo version into ~/mongodb/sources wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1604-4.4.0.tgz
  • Extract tar xfz mongodb-linux-x86_64-ubuntu1604-4.4.0.tgz && rm mongodb-linux-x86_64-ubuntu1604-4.4.0.tgz
  • Update symlink in ~/mongodb rm mongo && ln -s sources/mongodb-linux-x86_64-ubuntu1604-4.4.0/ mongo
  • Check versions of mongo and mongod with --version
  • Start mongod
  • Set new feature capabilities in authenticated mongo shell db.adminCommand( { setFeatureCompatibilityVersion: "4.4" } )
  • Check feature capabilities are set correctly in authenticated mongo shell db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } ) => should be new version

Clone this wiki locally