e.g.mongoexport -d-c -q '{query}' -f field1,field2,field3,...,fieldn --csv -o
mongoexport -d seo_metadata -c seo_product -q '{"create_date" : {"$lt":"2015-08-31"}}' -f create_date,update_date,object,meta_keyword,meta_title,meta_content --csv -o /var/tmp/outfile.csv
mongoimport restores a database from a backup taken with mongoexport.
mongoimport --dbMongo import/export can be done in json format too. for more information visit mongo documentation--collection --type csv --file
mongoimport --db users --collection contacts --type csv --file contacts.csv
No comments:
Post a Comment