Mongodb Mongo导入/转储不使用副本集

Mongodb Mongo导入/转储不使用副本集,mongodb,mongodump,Mongodb,Mongodump,我在备份副本集时遇到问题mongodump。出于好奇,在mongoexport上验证了相同的问题 以下是我的设置: mongodb-linux-x86_64-static-legacy-2.2.0 3节点副本集(截至正常运行时) 现在我正在进行导出: ~/mongo/bin/mongodump --host "eu-int/ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017" --db msgstore --collection forJam

我在备份副本集时遇到问题
mongodump
。出于好奇,在
mongoexport
上验证了相同的问题

以下是我的设置:

  • mongodb-linux-x86_64-static-legacy-2.2.0
  • 3节点副本集(截至正常运行时)
现在我正在进行导出:

~/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)
在仅指定单个节点(副本集的主节点)的情况下执行相同的命令将成功创建转储


请大家知道我做错了什么?

您遇到了MongoDB错误,该错误发生在2.2.0中,但在2.2.3(最新生产版本)中已修复


升级应该可以解决这个问题。

您应该转储一个副本节点(辅助节点,这样就不会影响主节点的性能)。记住,它们都有相同的数据。我想知道连接到整个副本集的选项是什么?在我的例子中,转储发生在使用DB的应用程序未激活的时刻,性能根本没有问题。我也不知道在进行转储时哪个节点是健康的。所以我想说-从副本集中备份此集合。只要数据正确,我不在乎它来自哪个节点。只是补充一下,我想为定期备份编写解决方案脚本。连接到每个节点,试图找出它是否正常运行,这对我来说似乎是一种解决方法,而不是正确的解决方案。我只是尝试复制它,它对我来说很好。我以与您相同的方式连接到副本集,转储工作正常`你每次都能复制这个吗?我可以,我怀疑是mongo版本(静态遗留)还是旧操作系统(Red Hat Enterprise Linux作为第4版(Nahant Update 8))。你认为其中任何一项都能带来不同吗?事实上,安装了2.2.3,问题就消失了。谢谢你的帮助和你的时间!
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)