mydumper
mydumper copied to clipboard
PingCAP fork of mydumper, with enhancements for TiDB
使用mydumper 备份大库,经常出现mydumper:7767 的错误 ** (mydumper:7767): CRITICAL **: 18:10:49.468: Could not read data from community.entity_property: Lost connection to MySQL server during query
have a database named `table-partition/TICASE-2098`, and mydumper will run failed with error: $ ./mydumper -h 172.16.4.178 -P 4000 -u root --skip-tz-utc -o lightning/data/ ** (mydumper:28826): CRITICAL **: 15:55:45.278: Error: DB:...
[`METRICS_SCHEMA`](https://pingcap.com/docs-cn/stable/system-tables/system-table-metrics-schema/#metrics-schema) is the system schema in TiDB, should ignore dump this schema if database is TiDB, otherwise will executed failed when use lightning to restore data. 
Command line: ```sh ./mydumper \ --outputdir=backup \ --host 127.0.0.1 -P 4000 -u root \ --long-query-guard=3600 \ --tidb-force-priority=LOW_PRIORITY \ --verbose=3 \ --regex "^(?!(INFORMATION_SCHEMA|PERFORMANCE_SCHEMA|METRICS_SCHEMA|INSPECTION_SCHEMA))" \ -t 8 -F 64 --skip-tz-utc --compress-protocol ```...
执行:./mydumper --socket=/tmp/mysql.sock --defaults-file=/home/path/data/old_tidbtest.cnf --skip-tz-utc --threads=40 --chunk-filesize=30 --complete-insert -o /home/path/data/tmp -B xxx_APP xxx_ORDER xxx_POINT xxx_SDK YYY_ANALYSIS YYY_MPLOG YYY_SALE AR BACKDB GG GG_DEV GG1_USRPRF_DAILY G4 G4_DEV ZZZ_MPLOG ZZZ_ORDER ZZZ_SALE ZZZ_SALE_REPORT HHH3 HHH3_DEV...
after TiDB support `show $table_name next_row_id` syntax, mydumper can be updated to use it. see https://github.com/pingcap/tidb/issues/14567.