I know that when we have to take full backup at database & collection level we use mongodump but with mongodump we can take backup of a particular record also so what is difference between mongodump and mongoexport?

  • Which respect wyou want to do the difference between mongodump & mongoexport? Could you elaborate bit more. – Md Haidar Ali Khan Jan 2 '18 at 13:32
  • Hi Haidar, My question is simple if mongodump can take backup of records (Partial backup) then why we use mongoexport for taking backup of records. if there is any importance of mongoexport then what is that? – yogesh.j Jan 2 '18 at 14:49

mongodump generates binary copies of data; it creates better, more efficient backups.

mongoexport can create JSON files; these can be used by other programs, and are basically human-readable as is.



mongodump is a utility for creating a binary export of the contents of a database. mongodump is used for full backup, partial backup, syncing from production to staging/development, and changing the storage engine.


As per MongoDB BOL Here mongodump is a utility for creating a binary export of the contents of a database. mongodump can export data from either mongod or mongos instances. mongodump only captures the documents in the database.The resulting backup is space efficient. By default, mongodump does not capture the contents of the local database.

Changed in version 3.4: MongoDB 3.4 added support for read-only views. By default, mongodump only captures a view’s metadata: it does not create a binary export of the documents included in the view. To capture the documents in a view use --viewsAsCollections.

Where as MongoDB document Here mongoexport is a utility that produces a JSON or CSV export of data stored in a MongoDB instance. Run mongoexport from the system command line, not the mongo shell.

mongoexport Required Access

  1. mongoexport requires read access on the target database.

  2. Ensure that the connecting user possesses, at a minimum, the read role on the target database.

  3. When connecting to a mongod or mongos that enforces Authentication, ensure you use the required security parameters based on the configured authentication mechanism.

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 in MongoDB Backup Methods for this kind of functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.