如果我有一个副本设置了一个名为davesReplSet
的运行,我关闭了我的计算机并返回并启动了一个与复制集中dbpath
匹配的Mongo实例我得到一个警告:
** WARNING: mongod started without --replSet yet 1 documents are present in local.system.replset
** Restart with --replSet unless you are doing maintenance and no other clients are connected.
** The TTL collection monitor will not start because of this.
**
如何确定该集的正确名称是什么?或者它正在运行的副本集?
答案 0 :(得分:1)
您可以使用shell
连接到此实例mongo <host>:<port>/local
然后,您可以访问system.replset
集合并通过发出以下内容查找副本集:
> use local
> db.system.replset.find({},{_id:1})
{ "_id" : "myReplSet" }