4

我有大约 4 GB 数据的数据库,当我尝试通过 mongodump 转储它时,它只转储了大约 1.93 GB 的数据。当我尝试克隆它时,db.copyDatabase()它会复制与 mongodump 相同数量的数据。

MongoDb有一些限制吗?

感谢您的帮助,对不起我的英语不好(我希望你能理解我)。

编辑

{
        "ns" : "some-db.persons",
        "firstExtent" : "0:31000 ns:some-db.persons",
        "lastExtent" : "4:b50d000 ns:some-db.persons",
        "extentCount" : 13,
        "extents" : [
                {
                        "loc" : "0:31000",
                        "xnext" : "0:42000",
                        "xprev" : "null",
                        "nsdiag" : "some-db.persons",
                        "size" : 32768,
                        "firstRecord" : "0:310b0",
                        "lastRecord" : "0:38e3c"
                },
                {
                        "loc" : "0:42000",
                        "xnext" : "0:62000",
                        "xprev" : "0:31000",
                        "nsdiag" : "some-db.persons",
                        "size" : 131072,
                        "firstRecord" : "0:420b0",
                        "lastRecord" : "0:61e64"
                },
                {
                        "loc" : "0:62000",
                        "xnext" : "0:e2000",
                        "xprev" : "0:42000",
                        "nsdiag" : "some-db.persons",
                        "size" : 524288,
                        "firstRecord" : "0:620b0",
                        "lastRecord" : "0:e0f0c"
                },
                {
                        "loc" : "0:e2000",
                        "xnext" : "0:372000",
                        "xprev" : "0:62000",
                        "nsdiag" : "some-db.persons",
                        "size" : 2097152,
                        "firstRecord" : "0:e20b0",
                        "lastRecord" : "0:2e1d94"
                },
                {
                        "loc" : "0:372000",
                        "xnext" : "0:dd6000",
                        "xprev" : "0:e2000",
                        "nsdiag" : "some-db.persons",
                        "size" : 8388608,
                        "firstRecord" : "0:3720b0",
                        "lastRecord" : "0:b71e80"
                },
                {
                        "loc" : "0:dd6000",
                        "xnext" : "0:2233000",
                        "xprev" : "0:372000",
                        "nsdiag" : "some-db.persons",
                        "size" : 11325440,
                        "firstRecord" : "0:dd60b0",
                        "lastRecord" : "0:18a2db8"
                },
                {
                        "loc" : "0:2233000",
                        "xnext" : "1:2000",
                        "xprev" : "0:dd6000",
                        "nsdiag" : "some-db.persons",
                        "size" : 15290368,
                        "firstRecord" : "0:22330b0",
                        "lastRecord" : "0:30c7e20"
                },
                {
                        "loc" : "1:2000",
                        "xnext" : "1:223d000",
                        "xprev" : "0:2233000",
                        "nsdiag" : "some-db.persons",
                        "size" : 20643840,
                        "firstRecord" : "1:20b0",
                        "lastRecord" : "1:13b1e9c"
                },
                {
                        "loc" : "1:223d000",
                        "xnext" : "2:2000",
                        "xprev" : "1:2000",
                        "nsdiag" : "some-db.persons",
                        "size" : 27869184,
                        "firstRecord" : "1:223d0b0",
                        "lastRecord" : "1:3cd0e7c"
                },
                {
                        "loc" : "2:2000",
                        "xnext" : "2:73ba000",
                        "xprev" : "1:223d000",
                        "nsdiag" : "some-db.persons",
                        "size" : 37625856,
                        "firstRecord" : "2:20b0",
                        "lastRecord" : "2:23e3dd8"
                },
                {
                        "loc" : "2:73ba000",
                        "xnext" : "3:4bd7000",
                        "xprev" : "2:2000",
                        "nsdiag" : "some-db.persons",
                        "size" : 50798592,
                        "firstRecord" : "2:73ba0b0",
                        "lastRecord" : "2:a42be78"
                },
                {
                        "loc" : "3:4bd7000",
                        "xnext" : "4:b50d000",
                        "xprev" : "2:73ba000",
                        "nsdiag" : "some-db.persons",
                        "size" : 68579328,
                        "firstRecord" : "3:4bd70b0",
                        "lastRecord" : "3:8d3dda4"
                },
                {
                        "loc" : "4:b50d000",
                        "xnext" : "null",
                        "xprev" : "3:4bd7000",
                        "nsdiag" : "some-db.persons",
                        "size" : 92581888,
                        "firstRecord" : "4:b50d0b0",
                        "lastRecord" : "4:ba17118"
                }
        ],
        "datasize" : 244286608,
        "nrecords" : 268872,
        "lastExtentSize" : 92581888,
        "padding" : 1,
        "firstExtentDetails" : {
                "loc" : "0:31000",
                "xnext" : "0:42000",
                "xprev" : "null",
                "nsdiag" : "some-db.persons",
                "size" : 32768,
                "firstRecord" : "0:310b0",
                "lastRecord" : "0:38e3c"
        },
        "lastExtentDetails" : {
                "loc" : "4:b50d000",
                "xnext" : "null",
                "xprev" : "3:4bd7000",
                "nsdiag" : "some-db.persons",
                "size" : 92581888,
                "firstRecord" : "4:b50d0b0",
                "lastRecord" : "4:ba17118"
        },
        "objectsFound" : 218678,
        "invalidObjects" : 0,
        "bytesWithHeaders" : 207046812,
        "bytesWithoutHeaders" : 203547964,
        "deletedCount" : 6,
        "deletedSize" : 87297536,
        "nIndexes" : 1,
        "keysPerIndex" : {
                "some-db.persons.$_id_" : 268872
        },
        "valid" : true,
        "errors" : [ ],
        "ok" : 1
}
4

1 回答 1

0

数据可能都在那里;随着时间的推移,MongoDB 会分配额外的空间,这些空间不会包含在副本中。检查集合中的文档计数以进行验证。

于 2013-05-04T13:59:38.293 回答