用自带的工具导出 json 或者 csv 都太慢了
cpu 和内存都没怎么变化两天才导出 30g 数据
大概需要导出五千万条,请问有什么办法么
1
fractal314 2015-11-29 19:56:08 +08:00
多找几台机子,自己写个脚本试试呢?
|
2
matthewz 2015-11-29 20:46:08 +08:00 1
Unfortunately, It's a feature of MongoDB
copy the files in your database directory itself (default /data/db) rather than using mongodump/mongoresotre. If you can shut down your database for periods of time, this is best. Otherwise, you have to use file system snapshots or similar. See this for more the official mongo blurb: http://docs.mongodb.org/manual/core/backups/ |
3
TJT 2015-11-29 21:17:25 +08:00 via Android
多进程和分布式
|
4
zzlyzq 2015-11-30 00:16:52 +08:00 via Android 1
如果是 replica set 模式,可以搞出来一个 secondary 然后移花接木
|
6
pancts OP @fractal314 分布式嘛。。资金短缺。。
|