If I have a mongo database URL of the following format
mongodb://someUsername:[email protected]:27017/some_collection
Is there an easy way to give this to mongorestore
without having to do
mongorestore -u someUsername -p somePassword -h some.server.com:27017 -db some_collection /path/to/dump
The reason I ask is because meteor mongo --url
gives back a url of that form (and it looks like a standardized url format) but it expires in one minute. Because the password and host can be pretty long, it's hit or miss whether I can copy the parameters over (correctly) in one minute, and usually requires several tries.
Does something like the following exist?
mongorestore --url blah_blah /path/to/dump
See also https://stackoverflow.com/a/15865565/586086
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…