Get connection uri from current client.

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: 2.11.6
    • Component/s: Configuration
    • None
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      I have a use case that need to backup / restore a collection in API.

      The most convenient and fastest solution is mongodump / mongorestore. Seeing that there is no API in driver to call dump or restore, so I need to start a new process to do it.

      Then I need to pass the current connection configuration to the mongodump / mongorestore. I don't want get the configuration from file or other way, because we have several ways to configure it (hard-code, config file, environment variable and so on). The most exact value should be read from the client.

       

      I've read the sources. I think we may should store and provide the public property MongoUrl in MongoClientSettings.

      What do you think about?

            Assignee:
            Boris Dogadov
            Reporter:
            闽 彭
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: