1) backup data
mkdir mongodb-dump-oct24-2019
cd mongodb-dump-oct24-2019
mongodump
Above will create a folder called 'dump' within 'mongodb-dump-oct24-2019' folder.
2) Uninstall existing version of mongodb
https://medium.com/@rajanmaharjan/uninstall-mongodb-macos-completely-d2a6d6c163f9
3) Install new version
https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew
cd mongodb-dump-oct24-2019
mongorestore
mkdir mongodb-dump-oct24-2019
cd mongodb-dump-oct24-2019
mongodump
Above will create a folder called 'dump' within 'mongodb-dump-oct24-2019' folder.
2) Uninstall existing version of mongodb
https://medium.com/@rajanmaharjan/uninstall-mongodb-macos-completely-d2a6d6c163f9
3) Install new version
https://stackoverflow.com/questions/57856809/installing-mongodb-with-homebrew
brew tap mongodb/brew
brew install mongodb-community@4.0
4) brew link --force mongodb-community@4.0brew services start mongodb-community@4.05) Restore data
cd mongodb-dump-oct24-2019
mongorestore
No comments:
Post a Comment