I want to export all collections in MongoDB by the command:
mongoexport -d dbname -o Mongo.json
The result is:
No collection specifie
First, of Start the Mongo DB - for that go to the path as ->
C:\Program Files\MongoDB\Server\3.2\bin and click on the mongod.exe file to start MongoDB server.
Command in Windows to Export
C:> mongodump --host remote_ip_address:27017 --db -o C:/Users/Desktop/temp-folder
Command in Windows to Import
C:> mongorestore --host=ip --port=27017 -d C:/Users/Desktop/temp-folder/db-dir