Uploaded image for project: 'MongoDB Database Tools'
  1. MongoDB Database Tools
  2. TOOLS-2867

Mongoexport doesn't support readPreferenceTags

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: mongoexport
    • Labels:
      None

      As per documentation for mongoexport v4.2 here:

      https://docs.mongodb.com/v4.2/reference/program/mongoexport/#connect-to-a-replica-set

      mongoexport does support this option, but it's currently not working.

       

      $ mongoexport --version
      mongoexport version: r4.2.14
      git version: 0e6db36e92d82cc81cbd40ffd607eae88dc1f09d
      Go version: go1.12.17
      os: linux
      arch: amd64
      compiler: gc
      

      eg:

       

      mongoexport --collection test --uri 'mongodb://test:test1@mongo1:27017,mongo2:27017/test?authSource=admin&readPreference=secondary&readPreferenceTags=nodeType:ANALYTICS'
      

      outputs:

      2021-05-11T22:30:06.081+0000 WARNING: ignoring unsupported URI parameter 'readpreferencetags'

      Which also implies that it will chose any secondary instead of the one with the nodeType indicated.

       

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            alejandrodini@mural.co Alejandro Dini
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: