From your input, it seems like you're trying to run mongorestore from inside the JS shell.
Mongorestore is a standalone application and runs directly from the terminal.
The following actions will not be performed:
c:\mongodb-win32-x86_64-2012-03-20\bin>mongo.exe MongoDB shell version: 2.1.1-pre- connecting to: test > mongorestore --db test --drop \dump\test Mon Mar 26 11:29:13 SyntaxError: missing ; before statement (shell):1 >
If you run mongorestore directly from the terminal, you must be successful:
c:\mongodb-win32-x86_64-2012-03-20\bin>mongorestore --db test --drop \dump\test connected to: 127.0.0.1 ... (truncated for brevity) ... c:\mongodb-win32-x86_64-2012-03-20\bin>
The Mongodump / mongorestore documentation can be found in the Export Export Tools documentation: http://www.mongodb.org/display/DOCS/Import+Export+Tools
source share