mongoimport and mongoexport requires JSON or CSV data.During execution It read string per line from the Input file and inserts it.
Whereas mongodump and mongorestore command use binary data(.bson file). It will have all collection and system indexes.This we can use for taking/applying hot backups of a database.
Hi Prithivi ,
ReplyDeleteHow this is different for mongoimport and mongoexport commands , any idea which should be used ?
Hi Ajay,
ReplyDeletemongoimport and mongoexport requires JSON or CSV data.During execution It read string per line from the Input file and inserts it.
Whereas mongodump and mongorestore command use binary data(.bson file). It will have all collection and system indexes.This we can use for taking/applying hot backups of a database.