我试图从转储恢复mongo但失败了:
mongorestore --port 27133 dump
2015-05-07T09:39:11.760+0300 Failed: no reachable servers
Run Code Online (Sandbox Code Playgroud)
虽然我可以毫无问题地连接到它:
$ mongo --port 27133
MongoDB shell version: 3.0.1
connecting to: 127.0.0.1:27133/test
Run Code Online (Sandbox Code Playgroud)
在日志文件中没有什么特别的:
2015-05-07T09:37:00.350+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:44901 #1 (1 connection now open)
2015-05-07T09:37:13.935+0300 I NETWORK [conn1] end connection 127.0.0.1:44901 (0 connections now open)
2015-05-07T09:39:08.752+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:44906 #2 (1 connection now open)
2015-05-07T09:39:11.763+0300 I NETWORK [conn2] end connection 127.0.0.1:44906 (0 connections now open)
2015-05-07T09:39:52.365+0300 I NETWORK [initandlisten] connection accepted from 127.0.0.1:44907 #3 …Run Code Online (Sandbox Code Playgroud) 考虑一下,我有4个复制集,配置如下:
{
"_id": "rs_0",
"version": 5,
"members" : [
{"_id": 1, "host": "127.0.0.1:27001"},
{"_id": 2, "host": "127.0.0.1:27002"},
{"_id": 3, "host": "127.0.0.1:27003"},
{"_id": 4, "host": "127.0.0.1:27004"}
]
}
Run Code Online (Sandbox Code Playgroud)
我可以使用连接到所有集
mongo --port <port>
有关于获取有关将独立转换为副本集的信息的文档,但有人可以告诉我如何从副本集转换回独立版本吗?