【概述】
使用dumpling执行备份操作,备份过程中终端退出,提示备份失败。
数据量大约180G。
执行的备份脚本如下:
./dumpling
-h 192.168.0.123
-P 1234
-u myusername
-p sfwef
–filetype sql
-t 12
–tidb-mem-quota-query 8589934592
-o /data/tidb-backup/backup_202109081616/
-r 1000000
-F 256MiB
【现象】
日志输出如下:
[2021/09/08 08:35:54.910 +08:00] [INFO] [status.go:36] [progress] [tables=“161/501 (32.1%)”] [“finished rows”=39350824] [“finished size”=13.82GB] [“average speed(MiB/s)”=109.7792875515895]
[2021/09/08 08:37:54.896 +08:00] [INFO] [status.go:36] [progress] [tables=“161/501 (32.1%)”] [“finished rows”=83867358] [“finished size”=30.45GB] [“average speed(MiB/s)”=132.18342482106738]
[2021/09/08 08:38:50.316 +08:00] [INFO] [collector.go:188] [“backup Failed summary : total backup ranges: 0, total success: 0, total failed: 0”]
[2021/09/08 08:42:37.576 +08:00] [ERROR] [main.go:77] [“dump failed error stack info”] [error=“sql: SELECT COLUMN_NAME,EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=? AND TABLE_NAME=? ORDER BY ORDINAL_POSITION;: driver: bad connection”] [errorVerbose=“driver: bad connection
sql: SELECT COLUMN_NAME,EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=? AND TABLE_NAME=? ORDER BY ORDINAL_POSITION;
github.com/pingcap/dumpling/v4/export.buildSelectField
\tgithub.com/pingcap/dumpling@/v4/export/sql.go:544
github.com/pingcap/dumpling/v4/export.dumpTableMeta
\tgithub.com/pingcap/dumpling@/v4/export/dump.go:561
github.com/pingcap/dumpling/v4/export.(*Dumper).dumpDatabases
\tgithub.com/pingcap/dumpling@/v4/export/dump.go:280
github.com/pingcap/dumpling/v4/export.(*Dumper).Dump
\tgithub.com/pingcap/dumpling@/v4/export/dump.go:213
main.main
\tgithub.com/pingcap/dumpling@/cmd/dumpling/main.go:74
runtime.main
\truntime/proc.go:203
runtime.goexit
\truntime/asm_amd64.s:1357”]
dump failed: sql: SELECT COLUMN_NAME,EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=? AND TABLE_NAME=? ORDER BY ORDINAL_POSITION;: driver: bad connection
【TiDB 版本】
v4.0.12