hex7c0/mongodb-backup

Unable to take back for this kind of URI as it from mongodb atlas, please help

Opened this issue · 2 comments

mongodb+srv://username:password@database-cluster-cpvum.mongodb.net/dbName?retryWrites=true&w=majority

Getting the following error:

{
"message": "invalid schema, expected mongodb",
"error": {},
"title": "ERROR"
}

I tried with mongodb lab url string and it worked but with this not working

take a look at the documentation:
https://docs.mongodb.com/manual/reference/connection-string/

this should be the format:
mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]

sujed commented

Hello @akhilesh2310, I had a similar problem where 'mongodb+srv' was the problem. I solved it by going to atlas configuration for the cluster and from there you click on "connect" and choose "connect from application" and choose the older version of the driver where it contains only "mongodb://" without" mongodb+srv:\".

Hope this helps.