Drainer is set for local backup of incremental data, but there are no records

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: drainer设置了本地备份增量数据,但是没有记录

| username: 胡杨树旁

When using binlog for incremental data synchronization, no local binlog files are generated. Configuration file:

pump_servers:
- host: 10.0.0.51
  ssh_port: 22
  port: 8250
  deploy_dir: /home/tidb/deploy/pump-8250
  data_dir: /home/tidb/deploy/pump-8250/data
  log_dir: /home/tidb/deploy/pump-8250/log
  config:
    gc: 7
  arch: amd64
  os: linux
drainer_servers:
- host: 10.0.0.52
  ssh_port: 22
  port: 8349
  deploy_dir: /home/tidb/deploy/drainer-8349
  data_dir: /home/tidb/deploy/drainer-8349/data
  log_dir: /home/tidb/deploy/drainer-8349/log
  config:
    syncer.db-type: file
    syncer.relay.log-dir: relaybinlog.drainer
    syncer.replicate-do-db:
    - epp
    syncer.to.dir: /home/tidb/binlog/pb
    syncer.to.retention-time: 2
  arch: amd64
  os: linux

Cluster status:

[root@tidb01 log]# tiup  cluster  display  mnn-cluster  
tiup is checking updates for component cluster ...
Starting component `cluster`: /root/.tiup/components/cluster/v1.11.0/tiup-cluster display mnn-cluster
Cluster type:       tidb
Cluster name:       mnn-cluster
Cluster version:    v5.0.0
Deploy user:        tidb
SSH type:           builtin
Dashboard URL:      http://10.0.0.51:2379/dashboard
Grafana URL:        http://10.0.0.51:3000
ID               Role        Host       Ports        OS/Arch       Status   Data Dir                                Deploy Dir
--               ----        ----       -----        -------       ------   --------                                ----------
10.0.0.52:8349   drainer     10.0.0.52  8349         linux/x86_64  Up       /home/tidb/deploy/drainer-8349/data     /home/tidb/deploy/drainer-8349
10.0.0.51:3000   grafana     10.0.0.51  3000         linux/x86_64  Up       -                                       /home/tidb/deploy/grafana-3000
10.0.0.51:2379   pd          10.0.0.51  2379/2380    linux/x86_64  Up|L|UI  /home/tidb/deploy/pd-2379/data          /home/tidb/deploy/pd-2379
10.0.0.51:9090   prometheus  10.0.0.51  9090         linux/x86_64  Up       /home/tidb/deploy/prometheus-9090/data  /home/tidb/deploy/prometheus-9090
10.0.0.51:8250   pump        10.0.0.51  8250         linux/x86_64  Up       /home/tidb/deploy/pump-8250/data        /home/tidb/deploy/pump-8250
10.0.0.52:4002   tidb        10.0.0.52  4002/10080   linux/x86_64  Up       -                                       /home/tidb/deploy/tidb
10.0.0.52:4003   tidb        10.0.0.52  4003/10081   linux/x86_64  Up       -                                       /home/tidb/deploy/tidb_server
10.0.0.52:20160  tikv        10.0.0.52  20160/20180  linux/x86_64  Up       /home/tidb/deploy/tikv-20160/data       /home/tidb/deploy/tikv-20160
10.0.0.52:20161  tikv        10.0.0.52  20161/20181  linux/x86_64  Up       /home/tidb/deploy/tikv-20161/data       /home/tidb/deploy/tikv-20161
10.0.0.52:20162  tikv        10.0.0.52  20162/20182  linux/x86_64  Up       /home/tidb/deploy/tikv-20162/data       /home/tidb/deploy/tikv-20162
Total nodes: 10

Specific operations:

mysql> select * from insurance_fun;
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
| id | funNo | funName      | funUrl                   | createBy | createDate          | updateBy | updateDate          | remarks | status |
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
| 1  | face  | Face Recognition | idcard.html              | admin    | 2019-07-18 13:21:49 | admin    | 2019-07-18 13:21:51 | NULL    | 1      |
| 2  | sign  | Electronic Signature | readingInstructions.html | admin    | 2019-07-18 17:42:28 | admin    | 2019-07-18 17:48:56 | NULL    | 0      |
| 3  | pic   | Image Completion | portrait.html            | admin    | 2019-07-18 17:42:30 | admin    | 2019-07-18 17:48:59 | NULL    | 1      |
| 4  | code  | Send SMS       | sendCode.html            | admin    | 2019-07-17 11:06:20 | admin    | 2019-07-17 11:06:23 | NULL    | 0      |
| 5  | pay   | Payment         | getPayList.html          | admin    | 2019-07-18 17:42:35 | admin    | 2019-07-18 17:49:02 | NULL    | 0      |
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
5 rows in set (0.02 sec)

mysql> select * from insurance_fun;
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
| id | funNo | funName      | funUrl                   | createBy | createDate          | updateBy | updateDate          | remarks | status |
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
| 1  | face  | Face Recognition | idcard.html              | admin    | 2019-07-18 13:21:49 | admin    | 2019-07-18 13:21:51 | NULL    | 1      |
| 2  | sign  | Electronic Signature | readingInstructions.html | admin    | 2019-07-18 17:42:28 | admin    | 2019-07-18 17:48:56 | NULL    | 0      |
| 3  | pic   | Image Completion | portrait.html            | admin    | 2019-07-18 17:42:30 | admin    | 2019-07-18 17:48:59 | NULL    | 1      |
| 4  | code  | Send SMS       | sendCode.html            | admin    | 2019-07-17 11:06:20 | admin    | 2019-07-17 11:06:23 | NULL    | 0      |
+----+-------+--------------+--------------------------+----------+---------------------+----------+---------------------+---------+--------+
4 rows in set (0.00 sec)

However, there is no data in the local incremental directory:

[root@tidb02 drainer-8349]# ls -rtl
total 0
drwxr-xr-x 2 tidb tidb 28 Jul  4  2022 scripts
drwxr-xr-x 2 tidb tidb 26 Jul  4  2022 conf
drwxr-xr-x 2 tidb tidb 21 Oct 17 12:56 bin.old.v5.0.0
drwxr-xr-x 2 tidb tidb 21 Oct 18 16:05 bin
drwx------ 2 tidb tidb 19 Mar 10 17:23 relaybinlog.drainer
drwxr-xr-x 2 tidb tidb 51 Mar 10 17:28 log
drwxr-xr-x 2 tidb tidb 23 Mar 10 17:33 data
[root@tidb02 drainer-8349]# du  -sh *
137M	bin
60M	bin.old.v5.0.0
4.0K	conf
4.0K	data
74M	log
0	relaybinlog.drainer
4.0K	scripts
[root@tidb02 drainer-8349]# pwd
/home/tidb/deploy/drainer-8349
| username: Lucien-卢西恩 | Original post link

Could you please confirm if the configuration was completed by referring to the document TiDB Binlog Relay Log | PingCAP 文档中心? Could you provide the startup logs to verify if the configuration has taken effect?

| username: 胡杨树旁 | Original post link

Problem solved, I was looking in the wrong file. Thank you.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.