I have a weird problem with my MongoDB Replica Set backup. I have 2 servers (one primary and one secondary), and I run a backup task every 2 hours.
I use this: mongodump.exe --db MyBase --out "d:\Backups"
But when I run this backup, my client application (C #) throws these errors:
MongoDB.Driver.MongoConnectionException: Cannot connect to the replica set member corresponding to the reading preference
I thought mongodump did not have such an effect on client applications. So to say.
I would like to force the backup operation only on the secondary server. How can I continue? What is the command to run?
Thank you for your help.
source
share