Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support mongodb+srv:// URI format, update to driver v3 #19

Open
Phoscur opened this issue Oct 2, 2018 · 0 comments
Open

Support mongodb+srv:// URI format, update to driver v3 #19

Phoscur opened this issue Oct 2, 2018 · 0 comments

Comments

@Phoscur
Copy link

Phoscur commented Oct 2, 2018

The new 3.6 driver and the MongoDB Cloud support a new URI format
mongodb+srv://

I was able to restore with the old (convoluted) format though.

New URI example:

mongodb+srv://user:pass@leby-rld09.mongodb.net/test?retryWrites=true

Error

Error: invalid schema, expected mongodb
    at module.exports (C:\Projects\leby\node_modules\mongodb-restore\node_modules\mongodb\lib\url_parser.js:18:11)
    at connect (C:\Projects\leby\node_modules\mongodb-restore\node_modules\mongodb\lib\mongo_client.js:289:16)
    at Function.MongoClient.connect (C:\Projects\leby\node_modules\mongodb-restore\node_modules\mongodb\lib\mongo_client.js:113:3)
    at go (C:\Projects\leby\node_modules\mongodb-restore\index.min.js:138:115)
    at Extract.<anonymous> (C:\Projects\leby\node_modules\mongodb-restore\index.min.js:194:60)
    at Extract.emit (events.js:185:15)
    at DirWriter.<anonymous> (C:\Projects\leby\node_modules\tar\lib\extract.js:82:8)
    at DirWriter.emit (events.js:185:15)
    at end (C:\Projects\leby\node_modules\fstream\lib\writer.js:324:14)
    at C:\Projects\leby\node_modules\fstream\lib\writer.js:314:34

Old format example:

mongodb://user:pass@leby-shard-00-00-rld09.mongodb.net:27017,leby-shard-00-01-rld09.mongodb.net:27017,leby-shard-00-02-rld09.mongodb.net:27017/Leby?ssl=true&replicaSet=leby-shard-0&authSource=admin&retryWrites=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant