I'm trying to get a dump of my local database and it seems I should be using:
mongodump --host localhost:3002 However, the terminal then tells me:
-bash: mongodump: command not found Am I missing something? Or going about this the wrong way? I'm using it on Mac from the terminal.
I installed mongo (I think) using the following commands:
curl http://downloads.mongodb.org/osx/mongodb-osx-x86_64-2.4.5.tgz > mongodb.tgz tar -zxvf mongodb.tgz
As of MongoDB 4.4 (released July 30, 2020), you may need to install mongodump separately because the MongoDB Database Tools (which comprises mongodump, mongorestore, and more) has become its own project.
I found this out because I upgraded to MongoDB 4.4 today and mongodump stopped working.
$ mongodump zsh: command not found: mongodump I'm on macOS and installed MongoDB via Homebrew. To get mongodump and friends back, I installed the MongoDB Database Tools via Homebrew:
brew tap mongodb/brew brew install mongodb-database-tools If you're on a different OS, this should help:
MongoDB Database Tools Installation
brew tap mongodb/brew; brew install mongodb-community will also install mongodump.
If you don't have the brew command, you really should consider install Homebrew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With