tspath: non required parameter。For data recovery when the service stops unexpectedly,Or when resuming a breakpoint(The default is to save the synchronization status in the oplogts folder under the path where the program is executed)
3.tspath param explain
When full synchronization has been completed,The program will be created under the path of tspath:oplogts/mydb_mycoll_latestoplog.log file,record time node,It means that the data before the time node has been synchronized,But when full synchronization fails, the file will not be created
Update every hour mydb_mycoll_latestoplog.log Time node in the file
When the service stops unexpectedly,and I don't want to have another full synchronization,Just synchronize the data that has not been synchronized since the service stopped,The tspath cannot be changed when the service starts again,Recover data from tspath
When the service stops unexpectedly,and want to resynchronize from earliest,You can delete the corresponding log file under the tspath or reselect a tspath
4.Remarks:
1.Involving incremental synchronization, the deployment form of mongodb needs to be a replica set or a single instance with oplog enabled
2.The user who starts the service needs to have the permission to create, view and delete the file under the parameter tspath path
3.The mongodb user in the parameter mongodb URL needs to have the query permission of oplog.rs under the admin Library
4.The index name created in ES is mongodb+'.'+mongocoll,eg: mydb.mycoll
5.More optional parameters:
1.syncType: Synchronization type
There are three values 0, 1, 2 optional, respectively:
0:The default value,means full + incremental synchronization
1:It means only full synchronization, the program will exit after the full synchronization
2:Indicates only incremental synchronization
eg :config.json:
{
"syncType":1 // Only full sync
}