Hi All,
I am new to MongoDB. When I am using "--directoryperdb" option in MongoExport I am getting an exception.
Here is the query what I am using
mongoexport.exe -f <FieldNames> --csv --dbpath d:\devhome\tools\mongodb\data\db --directoryperdb
Error:
no collection specified!
Export MongoDB data to CSV, TSV or JSON files.
After that I specified a collection name, now my query is
mongoexport.exe -f <FieldNames> --csv --dbpath d:\devhome\tools\mongodb\data\db --directoryperdb -c Person
Now I am getting
exported 0 records
Sun Sep 09 17:36:14 dbexit:
Sun Sep 09 17:36:14 [tools] shutdown: going to close listening sockets...
Sun Sep 09 17:36:14 [tools] shutdown: going to flush diaglog...
Sun Sep 09 17:36:14 [tools] shutdown: going to close sockets...
Sun Sep 09 17:36:14 [tools] shutdown: waiting for fs preallocator...
Sun Sep 09 17:36:14 [tools] shutdown: closing all files...
Sun Sep 09 17:36:14 [tools] closeAllFiles() finished
Sun Sep 09 17:36:14 [tools] shutdown: removing fs lock...
Sun Sep 09 17:36:14 dbexit: really exiting now
Here my doubt is how can we use --directoryperdb option. Could anyone help me on this. I stuck over here.
Note: If I remove --directoryperdb I am able to export one collection(If I specified dbname and collection name). How can we export all databases using MongoExport.
Thanks & Regards,
Amar