How to Import mongodb database from development Environment to local env by using Commmand? I have lots of collections in my development server. I need to use the same data for testing scenarios. I am trying to import all the data of development environment to local by command is it possible?

I successfully imported to a file by using below command:

mongoimport -d dbName -c collectionName dataFile.js


But how can we do same to import DB from development environment to local Env command-line?
The mongoimport tool is only intended for importing simple data in text formats (JSON, CSV, TSV).

To backup and restore a full database (including index definitions &amp; collection options) typical approaches are to use either:


Filesystem snapshots
mongodump / mongorestore


The MongoDB manual has a section on Backup and Recovery describing supported approaches for different types of deployments (standalone, replica set, sharded cluster).