github.com/pingcap/tiflow@v0.0.0-20240520035814-5bf52d54e205/dm/tests/dm_syncer/conf/dm-syncer-1.toml (about) 1 # Base Configuration. 2 3 # sub task name as identifier, should be unique 4 name = "hanfei" 5 6 # sub task mode, can be `all`, `full`, `incremental` 7 mode = "incremental" 8 9 # used for binlog replication 10 server-id = 101 11 source-id = "127.0.0.1:3306" 12 13 # which flavor mysql/mariadb 14 flavor = "mysql" 15 16 # meta schema in downstreaming database to store meta informaton of dm 17 meta-schema = "dm_meta" 18 # whether to disable heartbeat for calculating lag between master and syncer 19 disable-heartbeat = true 20 21 # replicate from relay log or remote binlog 22 binlog-type = "remote" 23 24 # Mydumper configuration 25 26 # -t, --threads 27 #threads = 16 28 29 # -F, --chunk-filesize 30 #chunk-filesize = 64 31 32 # --skip-tz-utc 33 #skip-tz-utc = true 34 35 # other extra args 36 #extra-args = "-B test -T t1,t2 --no-locks" 37 38 39 # Loader configuration 40 41 # Number of threads restoring concurrently for loader worker pool. Each worker restore one file at a time, increase this as TiKV nodes increase 42 pool-size = 16 43 44 # Syncer configuration 45 46 # different sub task should have different meta 47 # meta-file = "./syncer.subTaskA.meta" 48 [meta] 49 binlog-name = binlog-name-placeholder-1 50 binlog-pos = binlog-pos-placeholder-1 51 52 worker-count = 16 53 batch = 1000 54 55 # filter 56 57 # block allow list provides a library to filter replicate on schema/table by given rules 58 # support regular expression , start with '~' declare use regular expression. 59 # rules like replication rules in MySQL, ref document: 60 # https://dev.mysql.com/doc/refman/8.0/en/replication-rules-db-options.html 61 # https://dev.mysql.com/doc/refman/8.0/en/replication-rules-table-options.html 62 #[block-allow-list] 63 #do-dbs = ["~^b.*","s1"] 64 # 65 #ignore-dbs = ["~^b.*","s1"] 66 # 67 #[[block-allow-list.do-tables]] 68 #db-name = "your db" 69 #tbl-name = "your table" 70 # 71 #[[block-allow-list.ignore-tables]] 72 #db-name = "~^b.*" 73 #tbl-name = "~^a.*" 74 75 76 # filter-rules filter binlog events 77 #[[filter-rules]] 78 #schema-pattern = "shard_db_*" 79 #table-pattern = "shard_table_*" 80 # do all dml, ignore all ddl 81 #events = ["all dml"] 82 #action = "Do" 83 84 #[[filter-rules]] 85 #schema-pattern = "shard_db_*" 86 #table-pattern = "shard_table_*" 87 # ignore delete sqls and drop table ddls 88 #events = ["delete", "drop table"] 89 # regular expression, ignore drop procedure queries 90 # sql-pattern = ["^DROP\\s+PROCEDURE"] 91 #action = "Ignore" 92 93 94 # route table 95 96 # applied after filter 97 # our Selector is a two level selector (schemal level, and table level) 98 # [[route-rules]] 99 # schema-pattern = "shard_db_*" 100 # target-schema = "shard_db" 101 # [[route-rules]] 102 # schema-pattern = "shard_db_*" 103 # table-pattern = "shard_table_*" 104 # target-schema = "shard_db" 105 # target-table = "shard_table" 106 107 [from] 108 host = "127.0.0.1" 109 user = "root" 110 password = "123456" 111 port = 3306 112 # to: the target db 113 # from: the source db, not in this file, auto get it from worker's config 114 [to] 115 host = "127.0.0.1" 116 user = "test" 117 password = "123456" 118 port = 4000