Are you aware that you can also use filesystem snapshots as an alternative to mongodump ? A snapshot approaches includes the indexes and is typically faster than mongodump.
The mongodump command you are running should also include the --oplog field (http://docs.mongodb.org/manual/reference/program/mongodump/#cmdoption--oplog) to create a point in time snapshot of the mongod by including a partial oplog for the operations that occur during your mongodump. You also need to ensure that your oplog length is x3 times the length of your oplog, you can find this using the db.printReplicationInfo() command - http://docs.mongodb.org/manual/reference/method/db.printReplicationInfo/ This prevents the oplog from rolling over during your mongodump which could result in the dump missing critical data.
Without the oplog field then the data could have missed important data so I would take a new copy for your backup to be sure you have a point in time snapshot.
Hope this helps!
Eoin
Asya Kamsky
unread,
Apr 4, 2014, 11:56:35 PM4/4/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mongodb-user
When you connect to a replica set, the driver(s) will always try to
find the primary.
However, mongodump always attempts to read from a secondary
preferentially. I think that matches your observations.
Eoin's point about --oplog option is a good one, as is the one about
using file system snapshots.