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

Mongoexport doesn't support readPreferenceTags

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Minor - P4
    • Resolution: Duplicate
    • None
    • No versions
    • mongoexport
    • None

    Description

      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.

       

       

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: