使用mongoexport 按条件导出数据 (export mongo database by search conditions)

访问量: 2042

referred post: http://www.glenscott.co.uk/blog/exporting-a-single-document-from-mongodb/

简单的说: (long in short) 

导出:  / export: 

$ mongoexport -d 'm_video_fetcher_production' -c 'plans' -q '{cms_category_class: /IphoneSubChannel/}' -o ios_sub_channel_plans.js -p

导入: / import 

$ mongoimport -p -d 'm_video_fetcher_real_production' -c 'plans' ios_sub_channel_plans.js

订阅/RSS Feed

Subscribe

分类/category