-
Type: Task
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: mongoexport
-
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.