mongodb copydb命令复制gridfs db获取'BSONObj大小:0(0x00000000)无效'错误

时间:2014-01-23 08:14:01

标签: mongodb gridfs

我想将gridfs(db)从一台机器复制到另一台机器。我们使用copydb命令。

> db.runCommand({copydb:1,fromhost:"192.168.1.90",fromdb:"fs_photos",todb:"fs_photos"})
{
    "errmsg" : "exception: BSONObj size: -791766910 (0x8298CED0) is invalid.
 Size must be between 0 and 16793600(16MB) First element: \u0014(\u0003: Object
Id('2800b83401d09a00301401da')",
    "code" : 10334,
    "ok" : 0
}

我检查了fs_photos(fromdb,140G)最大文件长度:

> db.fs.files.find({},{"length":1}).sort({"length":-1}).limit(5)
{ "_id" : "527156688f75550f14cdbe44", "length" : NumberLong(1369101) }
{ "_id" : "8197434919771504494", "length" : NumberLong(937048) }
{ "_id" : "7022162555617835884", "length" : NumberLong(893162) }
{ "_id" : "15191928400030169903", "length" : NumberLong(785255) }
{ "_id" : "18167776422270657585", "length" : NumberLong(777711) }

是我的db错误?

0 个答案:

没有答案