http://blog.csdn.net/liuzhoulong/article/details/6849978
数据导出 mongoexport
假设库里有一张user 表,里面有2 条记录,我们要将它导出
> use my_mongodb
switched to db my_mongodb
> db.user.find();
{ "_id" : ObjectId("4f81a4a1779282ca68fd8a5a"), "uid" : 2, "username" : "Jerry", "age" : 100 }
{ "_id" : ObjectId("4f844d1847d25a9ce5f120c4"), "uid" : 1, "username" : "Tom", "age" : 25 }
>
1 常用导出方法
[root@localhost bin]# ./mongoexport -d my_mongodb -c user -o user.dat
connected to: ......
阅读全文