我在备份副本集mongodump
时遇到问题。出于好奇,我在mongoexport
验证了同样的问题。
这是我的设置:
PRIMARY> rs.status() { "set" : "eu-int", "date" : ISODate("2013-03-01T09:54:06Z"), "myState" : 1, "members" : [ { "_id" : 0, "name" : "ldnpsr1971:27017", "health" : 1, "state" : 1, "stateStr" : "PRIMARY", "uptime" : 26646, "optime" : { "t" : 1362131645000, "i" : 11 }, "optimeDate" : ISODate("2013-03-01T09:54:05Z"), "maintenanceMode" : -1, "self" : true }, { "_id" : 1, "name" : "ldnpsr1723:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 26646, "optime" : { "t" : 1362131645000, "i" : 8 }, "optimeDate" : ISODate("2013-03-01T09:54:05Z"), "lastHeartbeat" : ISODate("2013-03-01T09:54:05Z"), "pingMs" : 0 }, { "_id" : 2, "name" : "ldnpsr2114:27017", "health" : 1, "state" : 2, "stateStr" : "SECONDARY", "uptime" : 26641, "optime" : { "t" : 1362131645000, "i" : 11 }, "optimeDate" : ISODate("2013-03-01T09:54:05Z"), "lastHeartbeat" : ISODate("2013-03-01T09:54:06Z"), "pingMs" : 0 } ], "ok" : 1 }
现在我正在进行导出:
~/mongo/bin/mongodump --host "eu-int/ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017" --db msgstore --collection forJames --out ~/data/mongo-backup/eu-int/20130301
哪个死了:
Fri Mar 1 09:55:55 starting new replica set monitor for replica set eu-int with seed of ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017
Fri Mar 1 09:55:55 successfully connected to seed ldnpsr1971:27017 for replica set eu-int
Fri Mar 1 09:55:55 changing hosts to { 0: "ldnpsr1971:27017", 1: "ldnpsr2114:27017", 2: "ldnpsr1723:27017" } from eu-int/
Fri Mar 1 09:55:55 trying to add new host ldnpsr1723:27017 to replica set eu-int
Fri Mar 1 09:55:55 successfully connected to new host ldnpsr1723:27017 in replica set eu-int
Fri Mar 1 09:55:55 trying to add new host ldnpsr1971:27017 to replica set eu-int
Fri Mar 1 09:55:55 successfully connected to new host ldnpsr1971:27017 in replica set eu-int
Fri Mar 1 09:55:55 trying to add new host ldnpsr2114:27017 to replica set eu-int
Fri Mar 1 09:55:55 successfully connected to new host ldnpsr2114:27017 in replica set eu-int
Fri Mar 1 09:55:55 Primary for replica set eu-int changed to ldnpsr1971:27017
Fri Mar 1 09:55:55 replica set monitor for replica set eu-int started, address is eu-int/ldnpsr1723:27017,ldnpsr1971:27017,ldnpsr2114:27017
Fri Mar 1 09:55:55 [ReplicaSetMonitorWatcher] starting
connected to: eu-int/ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017
Fri Mar 1 09:55:55 DATABASE: msgstore to /home/ldnlmxi/data/mongo-backup/eu-int/20130301/msgstore
Illegal instruction (core dumped)
仅指定单个节点(副本集的PRIMARY节点)执行相同的命令会成功创建转储。
请有人知道我做错了吗?
答案 0 :(得分:1)
您遇到了发生在2.2.0中的MongoDB错误https://jira.mongodb.org/browse/SERVER-7006,但修复了2.2.3(最新生产版本)。
升级应解决问题。