# Run MongoD process and file below
MQ428GG8WL:week2 asee2278$ mongoimport –db students –collection grades –file grades.json
MQ428GG8WL:week2 asee2278$ mongoimport --db users --collection contacts --type csv --headerline --file /opt/backups/contacts.csv
Note : Do not fire this command in mongo shell, fire it on bash with directory where your json or import file eg grades.json is there. CSV
WARNING
Avoid using mongoimport and mongoexport for full instance production backups. They do not reliably preserve all rich BSON data types, because JSON can only represent a subset of the types supported by BSON. Use mongodump and mongorestore as described in MongoDB Backup Methods for this kind of functionality.