I want to export all collections in MongoDB by the command:
mongoexport -d dbname -o Mongo.json
The result is: No collection specifie
Here's what worked for me when restoring an exported database:
mongorestore -d 0 ./0 --drop
where ./contained the exported bson files. Note that the --drop will overwrite existing data.
--drop