Install MongoDB Tools
MacOS (M1):
Install MongoDB Shell (mongosh):
https://www.mongodb.com/docs/mongodb-shell/install/
#!/bin/bashcurl -OL https://downloads.mongodb.com/compass/mongosh-2.1.4-darwin-arm64.zipunzip mongosh-2.1.4-darwin-arm64.zip
sudo cp mongosh-2.1.4-darwin-arm64/bin/* /usr/local/bin/rm mongosh-2.1.4-darwin-arm64.ziprm -r mongosh-2.1.4-darwin-arm64Install MongoDB Tools (mongodump & mongorestore):
https://www.mongodb.com/try/download/database-tools
#!/bin/bashcurl -OL https://fastdl.mongodb.org/tools/db/mongodb-database-tools-macos-arm64-100.9.4.zipunzip mongodb-database-tools-macos-arm64-100.9.4.zip
sudo cp mongodb-database-tools-macos-arm64-100.9.4/bin/* /usr/local/bin/rm mongodb-database-tools-macos-arm64-100.9.4.ziprm -r mongodb-database-tools-macos-arm64-100.9.4Linux:
Install MongoDB Shell (mongosh):
https://www.mongodb.com/docs/mongodb-shell/install/
#!/bin/bashcurl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo tee /etc/apt/trusted.gpg.d/server-7.0.ascecho "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.listsudo apt-get updatesudo apt-get install -y mongodb-mongoshInstall MongoDB Tools (mongodump & mongorestore):
https://www.mongodb.com/docs/database-tools/installation/installation-linux/ https://www.mongodb.com/try/download/database-tools
#!/bin/bashcurl -OL https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2004-x86_64-100.9.4.debsudo apt install ./mongodb-database-tools-ubuntu2004-x86_64-100.9.4.deb