- 某些MySQL部署会定期清除binlog
- dtle增量复制依赖binlog,如果binlog被清除则复制会出错
- dtle全量标记增量开始位置, 若全量耗时较长, 开始增量时binlog极有可能被清除
- 需要在开始全量时将MySQL binlog暂存到dtle本地
在job.json源端任务配置中将BinlogRelay
设为true
"Type": "Src",
"Config": {
"BinlogRelay": true,
"Gtid": "",
若要在增量job(即指定Gtid)中使用BinlogRelay,则必须另外指定 BinlogFile
、BinlogPos
(见 show master status
).
参数说明详见作业配置.
binlog储存位置为 nomad_data_dir/binlog/job_name/mysql_server_uuid
。一般情况job被删除时会自动清除binlog目录。若未清除则需手动清除。