Example error:
root@tutorialspots:~# mongodump --db=dbmongo --archive=dbmongo --host=mongoset1:27017 2022-05-17T18:03:56.625+0000 writing dbmongo.jobs to archive 'dbmongo' 2022-05-17T18:03:56.626+0000 writing dbmongo.files to archive 'dbmongo' 2022-05-17T18:03:56.626+0000 writing dbmongo.track to archive 'dbmongo' 2022-05-17T18:03:56.627+0000 writing dbmongo.statistics to archive 'dbmongo' 2022-05-17T18:03:56.634+0000 Failed: archive writer: error writing data for collection `dbmongo.files` to disk: error reading collection: Failed to parse: { find: "files", skip: 0, snapshot: true, $readPreference: { mode: "secondaryPreferred" }, $db: "dbmongo" }. Unrecognized field 'snapshot'. / Mux ending but selectCases still open 4
Solution: add --forceTableScan
root@tutorialspots:~# mongodump --db=dbmongo --archive=dbmongo --host=mongoset1:27017 --forceTableScan 2022-05-17T18:09:56.770+0000 writing dbmongo.jobs to archive 'dbmongo' 2022-05-17T18:09:56.771+0000 writing dbmongo.statistics to archive 'dbmongo' 2022-05-17T18:09:56.771+0000 writing dbmongo.files to archive 'dbmongo' 2022-05-17T18:09:56.771+0000 writing dbmongo.track to archive 'dbmongo' 2022-05-17T18:09:56.773+0000 done dumping dbmongo.files (16 documents) 2022-05-17T18:09:56.773+0000 writing dbmongo.refresh_token to archive 'dbmongo' 2022-05-17T18:09:56.779+0000 done dumping dbmongo.statistics (5 documents) 2022-05-17T18:09:56.779+0000 writing dbmongo.credential to archive 'dbmongo' 2022-05-17T18:09:56.781+0000 done dumping dbmongo.track (8 documents) 2022-05-17T18:09:56.781+0000 writing dbmongo.tracks to archive 'dbmongo' 2022-05-17T18:09:56.782+0000 done dumping dbmongo.refresh_token (3 documents) 2022-05-17T18:09:56.783+0000 done dumping dbmongo.jobs (30 documents) 2022-05-17T18:09:56.785+0000 done dumping dbmongo.credential (3 documents) 2022-05-17T18:09:56.794+0000 done dumping dbmongo.tracks (3 documents)