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?
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
mongodump only captures the documents in the database.The resulting backup is space efficient.
mongodump does not capture the contents of the
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
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
mongoexport Required Access
mongoexportrequires read access on the target database.
Ensure that the connecting user possesses, at a minimum, the read role on the target database.
When connecting to a
mongosthat 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.
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.