can't map file memory - mongo requires 64 bit build for larger datasets

处理一次32bit mongdb 数据超过2G问题

can't map file memory - mongo requires 64 bit build for larger datasets

生产环境下某32bit windows机器安装了mongodb,一日数据超过2G

然后,任何操作都会报错

{
        "assertion" : "can't map file memory - mongo requires 64 bit build for larger datasets",
        "assertionCode" : 10084,
        "errmsg" : "db assertion failure",
        "ok" : 0
}

解决:

1.在windows机器拷贝下物理文件,拷贝到64bit linux机器

2.用原物理文件启动一个mongo实例

/usr/local/mongodb/bin/mongod --dbpath=/data1/mongodb/dataep/ --logpath=/data1/mongodb/logs/mongodbep.log --logappend --fork --port=27010 --rest --profile=1 --slowms=500

3.从新实例备份出需要的数据库

/usr/local/mongodb/bin/mongodump  --port 27010 -d ep -o /data1/backup/mongodbep/ 

4. 将备份文件还原到生产环境下mongodb

/usr/local/mongodb/bin/mongorestore  --host 172.21.5.49 --port 21017 -d ep /data1/backup/mongodbep/ep/

你可能感兴趣的:(mongodb,windows,数据库,File,Build,64bit)