Closed k-nuhdim closed 4 years ago
You should remove the old checkpoint which locates on the source MongoDB by default, 'cause the checkpoint format is changed since v2.4.0
Deleted all monoshake dbs from source database , but still egtting same issue, does that saving checkpoint anywhere else?
if the source MongoDB is replica, the address is mongoshake.ckpt_default on the source MongoDB.
if the source MongoDB is sharding, the address is admin.ckpt_default on config-server.
Once delete the checkpoint, if you start with sync_mode = all
, MongoShake will run full-sync and then incremental sync; if you start with sync_mode = oplog
, MongoShake will run incremental sync only to fetch the oldest oplog from souce MongoDB.
Hi vinellen, Just want to know how the " sync_mode = all " works , is it useful to sync all data from one replicaset to another ?
If you want to sync all data from one replica to another, please set sync_mode = all
. There're two stages of syncing:
So sync_mode = all
means full+incremental
, sync_mode = full
means only full sync, sync_mode = incr
means only incremental sync.
@vinllen - Thanks ! my use case is to replicate Production server data -----> DR Server and once its fail-over to DR happen then I need to change syncing direction from DR ----> PROD . so i hope if i make sync mode as full + increment it will sync all missing data first the later oplog will replaying based on the source write.
Currently, MongoShake only supports failover in the incremental stage which means if you restart MongoShake or MongoDB crash in full sync stage, you need to restart MongoShake to run full+incrmental sync again. But in the incremental stage, MongoShake supports resume-from-break-point.
@vinllen - Thanks for the confirmation - Closing this.
Below are snippet of collecter.log
[2020/04/18 13:39:55 IST] [CRIT] [collector.(*OplogSyncer).Start:194] load checkpoint[testdb] failed[current required checkpoint version[1] > input[0], please upgrade MongoShake to version >= 2.4.0]
Please help me on this.