I'm trying to migrate my local MongoDB over to Atlas.
(我正在尝试将本地MongoDB迁移到Atlas。)
I managed to run the mongodump command with localhost and can see the files in ./dump/data.bson
(我设法用localhost运行mongodump命令,并且可以在./dump/data.bson中看到文件)
However, when I now want to restore this dump onto Atlas, I get "Failed: error connecting to db server: no reachable servers".
(但是,当我现在想将此转储恢复到Atlas时,出现“失败:连接到数据库服务器时出错:没有可访问的服务器”。)
This is odd because I can connect to Atlas from the mongo shell (v4.0) using this command: "mongo mongodb+srv://cluster0-xxxxxx.mongodb.net/test --username Bob" where i get prompted for password and connect fine.
(这很奇怪,因为我可以使用以下命令从mongo shell(v4.0)连接到Atlas:“ mongo mongodb + srv://cluster0-xxxxxx.mongodb.net/test --username Bob”,在此提示输入密码并连接正常。)
This is the mongorestore command that's giving me the above connection error:
(这是mongorestore命令,它给了我上面的连接错误:)
mongorestore --ssl --host mongodb+srv://cluster0-xxxxx.mongodb.net/test --username Bob --authenticationDatabase admin --dir dump/data --password Test123
Appreciate your help.
(感谢你的帮助。)
ask by Jat90 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…