Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MongoDB: mongorestore: command not found

Tags:

I have started the M101 MongoDB online course. I am simply following this video to the point at 1:45 minutes into the video.

The restoremongo call returns mongorestore: command not found. This should connect to the server(which I can connect to and is running on my machine).

This is where I am at; please see below. I have copied and pasted the server info beneath this.
Any solutions?

tar xvf hw1-1.957cdceb1c1e.tar  x dump/ x dump/m101/ x dump/m101/funnynumbers.bson x dump/m101/funnynumbers.metadata.json x dump/m101/hw1.bson x dump/m101/hw1.metadata.json Geralds-MacBook-Pro:Downloads geraldnolan$ mongorestore -bash: mongorestore: command not found 

Server:

bsondump    mongodump   mongoimport mongorestore    mongostat mongo       mongoexport mongooplog  mongos      mongotop mongod      mongofiles  mongoperf   mongosniff Geralds-MacBook-Pro:bin geraldnolan$ ./mongod ./mongod --help for help and startup options Tue Jun 11 10:30:06.413 [initandlisten] MongoDB starting : pid=15803 port=27017 dbpath=/data/db/ 64-bit host=Geralds-MacBook-Pro.local Tue Jun 11 10:30:06.414 [initandlisten]  Tue Jun 11 10:30:06.414 [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 Tue Jun 11 10:30:06.414 [initandlisten] db version v2.4.4 Tue Jun 11 10:30:06.414 [initandlisten] git version: 4ec1fb96702c9d4c57b1e06dd34eb73a16e407d2 Tue Jun 11 10:30:06.414 [initandlisten] build info: Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49 Tue Jun 11 10:30:06.414 [initandlisten] allocator: system Tue Jun 11 10:30:06.414 [initandlisten] options: {} Tue Jun 11 10:30:06.415 [initandlisten] journal dir=/data/db/journal Tue Jun 11 10:30:06.415 [initandlisten] recover : no journal files present, no recovery needed Tue Jun 11 10:30:06.461 [websvr] admin web console waiting for connections on port 28017 Tue Jun 11 10:30:06.461 [initandlisten] waiting for connections on port 27017 
like image 509
user2472438 Avatar asked Jun 11 '13 09:06

user2472438


2 Answers

if you installed mongo using Macports, you need to also install mongo-tools to get mongodump, mongorestore, etc

like image 135
Black Avatar answered Oct 17 '22 11:10

Black


if your'e on a mac, simply use brew to install mongo

brew install mongo 
like image 35
eladHayun Avatar answered Oct 17 '22 11:10

eladHayun