I am not really sure how to use --oplog and --oplogReplay options.
I am having an issue where --oplogReplay does not apply any changes to
a remote instance.
Example
#1 download sample collection
wget
http://media.mongodb.org/zips.json
#2 import collection
mongoimport -h localhost --db scratch --collection zips --file
zips.json
#3 count collection
db.zips.find().count()
29470
#4 Take a backup of localhost
mongodump -h localhost
#5 restore backup to another instance
mongorestore -h remotehost dump
#6 Count objects on remote host
db.zips.find().count()
29470
#7 Delete all objects from localhost where state = FL and count
objects
db.zips.remove({state:'FL'})
db.zips.find().count()
28644
#8 take a backup of localhost using --oplog
mongdump -h localhost --oplog
#9 restore backup to remote host with --oplogReplay
mongorestore -h remotehost --oplogReplay dump
#10 count objects on remote host
db.zips.find().count()
29470
As you can see the deletes that were applied to localhost never get
applied to remote host.
Is this right use of --oplog & oplogReplay?
Thanks,
-MarkW