I have a mongodb cluster where shards exist across multi geographically locations and each of those locations have replica members for each shard. I have setup our DR datacenter. Which also has a mongos for creating backups. I want to use the mongodump command to dump the database onto the file system of the mongos instance before sending it off to long term archive. The issue is that mongodump command on sharded clusters sets read pref to secondary so it may dump data from an active production secondary and not the one I have setup for this processes.
When running mongodump against a mongos instance where the sharded cluster consists of replica sets, the read preference of the operation will prefer reads from secondary members of the set. http://docs.mongodb.org/manual/reference/program/mongodump/
I am looking for a way to change the readpref to nearest when running the mongodump command. Or if there is another command that will allow for the same sort of backup as mongodb. (http://docs.mongodb.org/manual/core/read-preference/)