dumpling备份数据终端

【概述】
使用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\nsql: SELECT COLUMN_NAME,EXTRA FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA=? AND TABLE_NAME=? ORDER BY ORDINAL_POSITION;\ngithub.com/pingcap/dumpling/v4/export.buildSelectField\n\tgithub.com/pingcap/dumpling@/v4/export/sql.go:544\ngithub.com/pingcap/dumpling/v4/export.dumpTableMeta\n\tgithub.com/pingcap/dumpling@/v4/export/dump.go:561\ngithub.com/pingcap/dumpling/v4/export.(*Dumper).dumpDatabases\n\tgithub.com/pingcap/dumpling@/v4/export/dump.go:280\ngithub.com/pingcap/dumpling/v4/export.(*Dumper).Dump\n\tgithub.com/pingcap/dumpling@/v4/export/dump.go:213\nmain.main\n\tgithub.com/pingcap/dumpling@/cmd/dumpling/main.go:74\nruntime.main\n\truntime/proc.go:203\nruntime.goexit\n\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

老哥,你的-r设置的太大了,调小点,20000再试试

您好,感谢您的回复,可是我的服务器是 16核 32G的,配置相当给力啊,难道 这个参数 100万就能导致我的内存溢出吗:flushed:

额,16c32G在官方要求中是普通的配置了,这个量级指定会炸,你可以看看当时的监控,估计tidb被打死了

老哥,不瞒你说,还真是,我把这个 -r 调小了以后真的就备份成功了:100:

1赞

:+1::+1::+1:

想问一下,dumpling备份的时候,-r -t 应该怎么设置,是看哪个节点的配置,我发现备份其实对集群还是有挺大的影响的