Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-3441

Get connection uri from current client.

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.11.6
    • Component/s: Configuration
    • None
    • Fully Compatible

      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:
            Unassigned Unassigned
            Reporter:
            pmznxxs@gmail.com 闽 彭
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: