upgrade/downgrade mongo

systemctl stop mongod.service
apt update
apt install mongodb-org=3.6.8 mongodb-org-mongos=3.6.8 mongodb-org-server=3.6.8 mongodb-org-shell=3.6.8 mongodb-org-tools=3.6.8
systemctl start mongod.service

mongo
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )

vi /etc/apt/sources.list.d/mongodb-org-4.0.list
deb [arch=amd64] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.0 multiverse
apt update mongodb*
apt upgrade

Leave a Reply

Your email address will not be published. Required fields are marked *