标签归档:mongoexport

MongoDB导出/导入指定条件数据

–export
~/mongodb2.4.6/bin/mongoexport -h 127.0.0.1:27017 -d intelligence -c intelligence -q ‘{“type”:3,”source”:{$in:[208,210]}}’ -o /home/map/backup/tmp/intelligence_208_210.data
–import
~/mongodb2.4.6/bin/mongoimport -h 127.0.0.1:27017 -d intelligence_test -c intelligence /home/map/backup/tmp/intelligence_208_210.data