Files backed up using BR in TiDB v5.4.1 cluster cannot be restored

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

Original topic: tidb v5.4.1 集群使用br 备份出来的文件无法恢复

| username: kkpeter

【TiDB Usage Environment】Production\Test Environment\POC
【TiDB Version】
【Encountered Issue】
Data backed up using br v5.4.1 in the TiDB v5.4.1 cluster cannot be restored!!


【Reproduction Path】What operations were performed that led to the issue

Backup and restore using br v5.4.1 in the TiDB v5.4.1 cluster, issue is consistently reproducible!!!
【Issue Phenomenon and Impact】

Cluster backup files cannot be used, cluster cannot be backed up and restored! Refer to the post below, someone encountered the same issue
BR备份报错:[pd] fetch pending tso requests error - #21,来自 qizheng - TiDB 的问答社区

If the question is related to performance optimization or fault troubleshooting, please download the script and run it. Please select all and copy-paste the terminal output results and upload them.

| username: kkpeter | Original post link

Can someone help take a look at this BR backup?

| username: xiaohetao | Original post link

Where are the backup files stored? Can all TiKV nodes in the cluster access the backup files?

| username: kkpeter | Original post link

us3, all TiKV nodes are accessible.

The v4.0.14 cluster has no issues.

| username: wakaka | Original post link

It seems that this directory file cannot be read.

| username: kkpeter | Original post link

It’s not that the directory can’t be read, it’s that the .sst file can’t be read because the backed-up .sst file size is 0.

However, the temp file below has a size, and it happens to be the expected size by br.

I swapped the filenames of the temp file and the .sst file, and it restored successfully.

| username: muliping | Original post link

The test did not reproduce the issue.
The backup file size is 0. Is there any error information in the backup log?

| username: muliping | Original post link

Run the backup again. Is it still the same issue? Is the SST size still 0?

| username: kkpeter | Original post link

The backup shows success.

| username: kkpeter | Original post link

The same result.

| username: muliping | Original post link

Can you try changing the backup directory?

| username: kkpeter | Original post link

Each backup is a new backup directory.

| username: muliping | Original post link

Tested without issues.
Can you send the complete logs of the backup and restore?
Was this cluster upgraded from a lower version?

| username: kkpeter | Original post link

It was not upgraded, it was created directly.

| username: muliping | Original post link

Could you please send the complete logs for the backup and restore?

| username: kkpeter | Original post link

One moment, I’m organizing the logs.

| username: kkpeter | Original post link

br backup

Backup Command

v5.4.1/br backup full --pd=10.x.139.xxx:10003 -f '*.*' -f '!mysql.*' -f '!INFORMATION_SCHEMA.*' -f '!METRICS_SCHEMA.*' -f '!PERFORMANCE_SCHEMA.*' -f '!tidb_loader.*' --checksum=true --storage=local:///mnt/positive_volume/peter_test_20220623001 --log-file=scripts/backup1.log

Log Output

[2022/06/23 15:49:52.165 +08:00] [INFO] [info.go:49] ["Welcome to Backup & Restore (BR)"] [release-version=v5.4.1] [git-hash=be484475e76b3aaa2cad520111353c3327db35fa] [git-branch=heads/refs/tags/v5.4.1] [go-version=go1.16.4] [utc-build-time="2022-05-07 01:26:52"] [race-enabled=false]
[2022/06/23 15:49:52.165 +08:00] [INFO] [common.go:634] [arguments] [__command="br backup full"] [checksum=true] [filter="[*.*,!mysql.*,!grafana_ucloud.*,!INFORMATION_SCHEMA.*,!METRICS_SCHEMA.*,!PERFORMANCE_SCHEMA.*,!tidb_loader.*]"] [log-file=/root/wakanda/action/scripts/backup1.log] [pd="[10.9.139.114:10003]"] [storage=local:///mnt/positive_volume/peter_test_20220623001]
[2022/06/23 15:49:52.165 +08:00] [INFO] [conn.go:244] ["new mgr"] [pdAddrs=10.9.139.114:10003]
[2022/06/23 15:49:52.166 +08:00] [INFO] [client.go:352] ["[pd] create pd client with endpoints"] [pd-address="[10.9.139.114:10003]"]
[2022/06/23 15:49:52.168 +08:00] [INFO] [base_client.go:331] ["[pd] update member urls"] [old-urls="[http://10.9.139.114:10003]"] [new-urls="[http://10.9.139.114:10003,http://10.9.59.162:10001,http://10.9.98.126:10001]"]
[2022/06/23 15:49:52.168 +08:00] [INFO] [base_client.go:349] ["[pd] switch leader"] [new-leader=http://10.9.139.114:10003] [old-leader=]
[2022/06/23 15:49:52.168 +08:00] [INFO] [base_client.go:104] ["[pd] init cluster id"] [cluster-id=7111513361699399115]
[2022/06/23 15:49:52.168 +08:00] [INFO] [client.go:648] ["[pd] tso dispatcher created"] [dc-location=global]
[2022/06/23 15:49:52.168 +08:00] [INFO] [conn.go:219] ["checked alive KV stores"] [aliveStores=3] [totalStores=3]
[2022/06/23 15:49:52.168 +08:00] [INFO] [client.go:352] ["[pd] create pd client with endpoints"] [pd-address="[10.9.139.114:10003]"]
[2022/06/23 15:49:52.170 +08:00] [INFO] [base_client.go:331] ["[pd] update member urls"] [old-urls="[http://10.9.139.114:10003]"] [new-urls="[http://10.9.139.114:10003,http://10.9.59.162:10001,http://10.9.98.126:10001]"]
[2022/06/23 15:49:52.170 +08:00] [INFO] [base_client.go:349] ["[pd] switch leader"] [new-leader=http://10.9.139.114:10003] [old-leader=]
[2022/06/23 15:49:52.170 +08:00] [INFO] [base_client.go:104] ["[pd] init cluster id"] [cluster-id=7111513361699399115]
[2022/06/23 15:49:52.170 +08:00] [INFO] [client.go:648] ["[pd] tso dispatcher created"] [dc-location=global]
[2022/06/23 15:49:52.171 +08:00] [INFO] [tidb.go:72] ["new domain"] [store=tikv-7111513361699399115] ["ddl lease"=1s] ["stats lease"=-1ns] ["index usage sync lease"=0s]
[2022/06/23 15:49:52.201 +08:00] [INFO] [domain.go:169] ["full load InfoSchema success"] [currentSchemaVersion=0] [neededSchemaVersion=90] ["start time"=19.366697ms]
[2022/06/23 15:49:52.203 +08:00] [INFO] [domain.go:432] ["full load and reset schema validator"]
[2022/06/23 15:49:52.203 +08:00] [INFO] [ddl.go:347] ["[ddl] start DDL"] [ID=42873ba9-210a-4e16-a578-263031accb45] [runWorker=false]
[2022/06/23 15:49:52.205 +08:00] [INFO] [backup.go:261] ["get newCollationEnable for check during restore"] [newCollationEnable=False]
[2022/06/23 15:49:52.205 +08:00] [INFO] [client.go:93] ["new backup client"]
[2022/06/23 15:49:53.552 +08:00] [INFO] [client.go:137] ["backup encode timestamp"] [BackupTS=434102755263774721]
[2022/06/23 15:49:53.552 +08:00] [INFO] [backup.go:295] ["current backup safePoint job"] [safePoint="{ID=br-678461d8-cca3-48bd-9503-0bd2cba2fe2e,TTL=5m0s,BackupTime=\"2022-06-23 15:49:53.505 +0800 CST\",BackupTS=434102755263774721}"]
[2022/06/23 15:49:53.559 +08:00] [INFO] [client.go:505] ["backup started"] [range-sn=2] [startKey=7480000000000000A55F720000000000000000] [endKey=7480000000000000A55F72FFFFFFFFFFFFFFFF00] [rateLimit=0] [concurrency=4]
[2022/06/23 15:49:53.559 +08:00] [INFO] [client.go:505] ["backup started"] [range-sn=0] [startKey=7480000000000000A85F720000000000000000] [endKey=7480000000000000A85F72FFFFFFFFFFFFFFFF00] [rateLimit=0] [concurrency=4]
[2022/06/23 15:49:53.559 +08:00] [INFO] [client.go:505] ["backup started"] [range-sn=1] [startKey=7480000000000000A85F69800000000000000100] [endKey=7480000000000000A85F698000000000000001FB] [rateLimit=0] [concurrency=4]
[2022/06/23 15:49:53.561 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=0] [store-id=4] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=0] [store-id=5] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=0] [store-id=1] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=1] [store-id=4] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=1] [store-id=5] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=2] [store-id=1] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=2] [store-id=4] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=1] [store-id=1] ["retry time"=0]
[2022/06/23 15:49:53.562 +08:00] [INFO] [client.go:918] ["try backup"] [range-sn=2] [store-id=5] ["retry time"=0]
[2022/06/23 15:49:53.730 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=0] [store-id=4] [retry-time=0]
[2022/06/23 15:49:53.731 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=1] [store-id=4] [retry-time=0]
[2022/06/23 15:49:53.731 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=2] [store-id=4] [retry-time=0]
[2022/06/23 15:49:53.737 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=0] [store-id=5] [retry-time=0]
[2022/06/23 15:49:53.737 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=1] [store-id=5] [retry-time=0]
[2022/06/23 15:49:53.737 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=2] [store-id=5] [retry-time=0]
[2022/06/23 15:49:54.295 +08:00] [INFO] [client.go:986] ["range backed up"] [range-sn=1] [store-id=1] [small-range-start-key=7480000000000000A85F69800000000000000100] [small-range-end-key=7480000000000000A85F698000000000000001FB]
[2022/06/23 15:49:54.295 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=1] [store-id=1] [retry-time=0]
[2022/06/23 15:49:54.295 +08:00] [INFO] [client.go:527] ["finish backup push down"] [range-sn=1] [small-range-count=1]
[2022/06/23 15:49:54.295 +08:00] [INFO] [client.go:547] ["time range backed up"] [range-sn=1] [StartVersion=0] [EndVersion=434102755263774721]
[2022/06/23 15:49:54.295 +08:00] [INFO] [client.go:499] ["backup range finished"] [range-sn=1] [take=735.420384ms]
[2022/06/23 15:49:54.303 +08:00] [INFO] [client.go:986] ["range backed up"] [range-sn=0] [store-id=1] [small-range-start-key=7480000000000000A85F720000000000000000] [small-range-end-key=7480000000000000A85F72FFFFFFFFFFFFFFFF00]
[2022/06/23 15:49:54.303 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=0] [store-id=1] [retry-time=0]
[2022/06/23 15:49:54.303 +08:00] [INFO] [client.go:527] ["finish backup push down"] [range-sn=0] [small-range-count=1]
[2022/06/23 15:49:54.303 +08:00] [INFO] [client.go:547] ["time range backed up"] [range-sn=0] [StartVersion=0] [EndVersion=434102755263774721]
[2022/06/23 15:49:54.303 +08:00] [INFO] [client.go:499] ["backup range finished"] [range-sn=0] [take=744.182395ms]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:986] ["range backed up"] [range-sn=2] [store-id=1] [small-range-start-key=7480000000000000A55F720000000000000000] [small-range-end-key=7480000000000000A55F72FFFFFFFFFFFFFFFF00]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:968] ["backup streaming finish"] [range-sn=2] [store-id=1] [retry-time=0]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:527] ["finish backup push down"] [range-sn=2] [small-range-count=1]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:547] ["time range backed up"] [range-sn=2] [StartVersion=0] [EndVersion=434102755263774721]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:499] ["backup range finished"] [range-sn=2] [take=752.129861ms]
[2022/06/23 15:49:54.311 +08:00] [INFO] [client.go:484] ["Backup Ranges"] [take=2.173µs]
[2022/06/23 15:49:54.311 +08:00] [INFO] [metafile.go:562] ["write metas finished"] [type=datafile]
[2022/06/23 15:49:54.311 +08:00] [INFO] [metafile.go:602] ["finish the write metas"] [item=3] [type=datafile] [costs=752.409758ms]
[2022/06/23 15:49:54.312 +08:00] [INFO] [worker.go:73] ["table checksum start"] [db=peter] [table=runoob_tbl]
[2022/06/23 15:49:54.312 +08:00] [INFO] [worker.go:73] ["table checksum start"] [db=test] [table=tidb_demo]
[2022/06/23 15:49:54.312 +08:00] [INFO] [worker.go:73] ["table checksum finished"] [db=peter] [table=runoob_tbl] [Crc64Xor=8328212611495905372] [TotalKvs=266] [TotalBytes=17024] [take=548.769µs]
[2022/06/23 15:49:54.312 +08:00] [INFO] [worker.go:73] ["table checksum finished"] [db=test] [table=tidb_demo] [Crc64Xor=2923342626563082014] [TotalKvs=4] [TotalBytes=186] [take=827.985µs]
[2022/06/23 15:49:54.312 +08:00] [INFO] [schema.go:137] ["backup checksum"] [take=949.132µs]
[2022/06/23 15:49:54.312 +08:00] [INFO] [metafile.go:562] ["write metas finished"] [type=schema]
[2022/06/23 15:49:54.312 +08:00] [INFO] [metafile.go:602] ["finish the write metas"] [item=5] [type=schema] [costs=965.519µs]
[2022/06/23 15:49:54.313 +08:00] [INFO] [metafile.go:622] ["save backup meta"] [size=5887]
[2022/06/23 15:49:54.364 +08:00] [INFO] [validate.go:78] ["checksum success
| username: kkpeter | Original post link

Backup File Results

| username: kkpeter | Original post link

BR restore log output

[2022/06/23 15:55:29.727 +08:00] [INFO] [info.go:49] ["Welcome to Backup & Restore (BR)"] [release-version=v5.4.1] [git-hash=be484475e76b3aaa2cad520111353c3327db35fa] [git-branch=heads/refs/tags/v5.4.1] [go-version=go1.16.4] [utc-build-time="2022-05-07 01:26:52"] [race-enabled=false]
[2022/06/23 15:55:29.727 +08:00] [INFO] [common.go:634] [arguments] [__command="br restore full"] [checksum=true] [filter="[*.*,!mysql.*,!grafana_ucloud.*,!INFORMATION_SCHEMA.*,!METRICS_SCHEMA.*,!PERFORMANCE_SCHEMA.*,!tidb_loader.*]"] [log-file=/root/wakanda/action/scripts/restore1.log] [pd="[10.9.139.114:10003]"] [storage=local:///mnt/positive_volume/peter_test_20220623001]
[2022/06/23 15:55:29.728 +08:00] [INFO] [conn.go:244] ["new mgr"] [pdAddrs=10.9.139.114:10003]
[2022/06/23 15:55:29.728 +08:00] [INFO] [client.go:352] ["[pd] create pd client with endpoints"] [pd-address="[10.9.139.114:10003]"]
[2022/06/23 15:55:29.730 +08:00] [INFO] [base_client.go:331] ["[pd] update member urls"] [old-urls="[http://10.9.139.114:10003]"] [new-urls="[http://10.9.139.114:10003,http://10.9.59.162:10001,http://10.9.98.126:10001]"]
[2022/06/23 15:55:29.730 +08:00] [INFO] [base_client.go:349] ["[pd] switch leader"] [new-leader=http://10.9.139.114:10003] [old-leader=]
[2022/06/23 15:55:29.730 +08:00] [INFO] [base_client.go:104] ["[pd] init cluster id"] [cluster-id=7111513361699399115]
[2022/06/23 15:55:29.730 +08:00] [INFO] [client.go:648] ["[pd] tso dispatcher created"] [dc-location=global]
[2022/06/23 15:55:29.731 +08:00] [INFO] [conn.go:219] ["checked alive KV stores"] [aliveStores=3] [totalStores=3]
[2022/06/23 15:55:29.731 +08:00] [INFO] [client.go:352] ["[pd] create pd client with endpoints"] [pd-address="[10.9.139.114:10003]"]
[2022/06/23 15:55:29.732 +08:00] [INFO] [base_client.go:331] ["[pd] update member urls"] [old-urls="[http://10.9.139.114:10003]"] [new-urls="[http://10.9.139.114:10003,http://10.9.59.162:10001,http://10.9.98.126:10001]"]
[2022/06/23 15:55:29.732 +08:00] [INFO] [base_client.go:349] ["[pd] switch leader"] [new-leader=http://10.9.139.114:10003] [old-leader=]
[2022/06/23 15:55:29.732 +08:00] [INFO] [base_client.go:104] ["[pd] init cluster id"] [cluster-id=7111513361699399115]
[2022/06/23 15:55:29.732 +08:00] [INFO] [client.go:648] ["[pd] tso dispatcher created"] [dc-location=global]
[2022/06/23 15:55:29.733 +08:00] [INFO] [tidb.go:72] ["new domain"] [store=tikv-7111513361699399115] ["ddl lease"=1s] ["stats lease"=-1ns] ["index usage sync lease"=0s]
[2022/06/23 15:55:29.761 +08:00] [INFO] [domain.go:169] ["full load InfoSchema success"] [currentSchemaVersion=0] [neededSchemaVersion=93] ["start time"=14.948217ms]
[2022/06/23 15:55:29.763 +08:00] [INFO] [domain.go:432] ["full load and reset schema validator"]
[2022/06/23 15:55:29.763 +08:00] [INFO] [ddl.go:347] ["[ddl] start DDL"] [ID=481e89fc-99cb-41f7-a8c7-c41bf1efd5c2] [runWorker=true]
[2022/06/23 15:55:29.763 +08:00] [INFO] [manager.go:189] ["start campaign owner"] [ownerInfo="[ddl] /tidb/ddl/fg/owner"]
[2022/06/23 15:55:29.764 +08:00] [INFO] [ddl.go:336] ["[ddl] start delRangeManager OK"] ["is a emulator"=false]
[2022/06/23 15:55:29.764 +08:00] [INFO] [ddl_worker.go:156] ["[ddl] start DDL worker"] [worker="worker 1, tp general"]
[2022/06/23 15:55:29.765 +08:00] [WARN] [sysvar_cache.go:54] ["sysvar cache is empty, triggering rebuild"]
[2022/06/23 15:55:29.765 +08:00] [INFO] [ddl_worker.go:156] ["[ddl] start DDL worker"] [worker="worker 2, tp add index"]
[2022/06/23 15:55:29.767 +08:00] [INFO] [manager.go:189] ["start campaign owner"] [ownerInfo="[stats] /tidb/stats/owner"]
[2022/06/23 15:55:29.769 +08:00] [INFO] [manager.go:189] ["start campaign owner"] [ownerInfo="[stats] /tidb/stats/owner"]
[2022/06/23 15:55:29.898 +08:00] [INFO] [client.go:210] ["load backupmeta"] [databases=2] [jobs=0]
[2022/06/23 15:55:29.903 +08:00] [INFO] [import.go:249] ["multi ingest support"] [support=true]
[2022/06/23 15:55:29.907 +08:00] [WARN] [restore.go:603] ["set max-index-length to max(3072*4) to skip check index length in DDL"]
[2022/06/23 15:55:29.915 +08:00] [INFO] [ddl_worker.go:322] ["[ddl] add DDL jobs"] ["batch count"=1] [jobs="ID:172, Type:create schema, State:none, SchemaState:queueing, SchemaID:171, TableID:0, RowCount:0, ArgLen:1, start time: 2022-06-23 15:55:29.904 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0; "]
[2022/06/23 15:55:29.917 +08:00] [INFO] [ddl.go:572] ["[ddl] start DDL job"] [job="ID:172, Type:create schema, State:none, SchemaState:queueing, SchemaID:171, TableID:0, RowCount:0, ArgLen:1, start time: 2022-06-23 15:55:29.904 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"] [query="/*from(br)*/CREATE DATABASE /*!32312 IF NOT EXISTS*/ `peter` /*!40100 DEFAULT CHARACTER SET utf8mb4 */"]
[2022/06/23 15:55:29.927 +08:00] [INFO] [domain.go:138] ["diff load InfoSchema success"] [currentSchemaVersion=93] [neededSchemaVersion=94] ["start time"=862.231µs] [phyTblIDs="[]"] [actionTypes="[]"]
[2022/06/23 15:55:30.419 +08:00] [INFO] [ddl.go:635] ["[ddl] DDL job is finished"] [jobID=172]
[2022/06/23 15:55:30.419 +08:00] [INFO] [callback.go:107] ["performing DDL change, must reload"]
[2022/06/23 15:55:30.424 +08:00] [INFO] [client.go:456] ["start create tables"]
[2022/06/23 15:55:30.424 +08:00] [INFO] [restore.go:433] ["range and file prepared"] ["file count"=3] ["range count"=3]
[2022/06/23 15:55:30.424 +08:00] [INFO] [client.go:526] ["table created"] [speed="3417.11 ops/s"] [table=tidb_demo] [database=test]
[2022/06/23 15:55:30.424 +08:00] [INFO] [util.go:236] ["merge and validate file"] [database=test] [table=tidb_demo] [Files(total)=2] [File(write)=2] [File(default)=0] [Region(total)=2] ["Regoin(keys avg)"=2] ["Region(bytes avg)"=93] [Merged(regions)=2] ["Merged(keys avg)"=2] ["Merged(bytes avg)"=93]
[2022/06/23 15:55:30.424 +08:00] [INFO] [client.go:713] ["switch to import mode at beginning"]
[2022/06/23 15:55:30.427 +08:00] [INFO] [pd.go:415] ["pause scheduler successful at beginning"] [name="[balance-region-scheduler,balance-leader-scheduler,balance-hot-region-scheduler]"]
[2022/06/23 15:55:30.429 +08:00] [INFO] [pd.go:423] ["pause configs successful at beginning"] [cfg="{\"enable-location-replacement\":\"false\",\"leader-schedule-limit\":12,\"max-merge-region-keys\":0,\"max-merge-region-size\":0,\"max-pending-peer-count\":2147483647,\"max-snapshot-count\":40,\"region-schedule-limit\":40}"]
[2022/06/23 15:55:30.429 +08:00] [INFO] [client.go:307] ["reset pd timestamp"] [ts=434102755263774721]
[2022/06/23 15:55:30.430 +08:00] [INFO] [client.go:796] ["Start to validate checksum"]
[2022/06/23 15:55:30.433 +08:00] [INFO] [ddl_worker.go:322] ["[ddl] add DDL jobs"] ["batch count"=1] [jobs="ID:174, Type:create table, State:none, SchemaState:queueing, SchemaID:171, TableID:173, RowCount:0, ArgLen:1, start time: 2022-06-23 15:55:30.411 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0; "]
[2022/06/23 15:55:30.436 +08:00] [INFO] [ddl.go:572] ["[ddl] start DDL job"] [job="ID:174, Type:create table, State:none, SchemaState:queueing, SchemaID:171, TableID:173, RowCount:0, ArgLen:1, start time: 2022-06-23 15:55:30.411 +0800 CST, Err:<nil>, ErrCount:0, SnapshotVersion:0"] [query="/*from(br)*/CREATE TABLE `runoob_tbl` (\
  `runoob_id` int(11) NOT NULL AUTO_INCREMENT,\
  `runoob_title` varchar(100) NOT NULL,\
  `runoob_author` varchar(40) NOT NULL,\
  `submission_date` date DEFAULT NULL,\
  PRIMARY KEY (`runoob_id`) /*T![clustered_index] CLUSTERED */\
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin"]
[2022/06/23 15:55:30.454 +08:00] [INFO] [domain.go:138] ["diff load InfoSchema success"] [currentSchemaVersion=94] [neededSchemaVersion=95] ["start time"=2.037614ms] [phyTblIDs="[173]"] [actionTypes="[8]"]
[2022/06/23 15:55:30.939 +08:00] [INFO] [ddl.go:635] ["[ddl] DDL job is finished"] [jobID=174]
[2022/06/23 15:55:30.943 +08:00] [INFO] [callback.go:107] ["performing DDL change, must reload"]
[2022/06/23 15:55:30.944 +08:00] [INFO] [client.go:526] ["table created"] [speed="3.85 ops/s"] [table=runoob_tbl] [database=peter]
[2022/06/23 15:55:30.944 +08:00] [INFO] [util.go:236] ["merge and validate file"] [database=peter] [table=runoob_tbl] [Files(total)=1] [File(write)=1] [File(default)=0] [Region(total)=1] ["Regoin(keys avg)"=266] ["Region(bytes avg)"=17024] [Merged(regions)=1] ["Merged(keys avg)"=266] ["Merged(bytes avg)"=17024]
[2022/06/23 15:55:30.944 +08:00] [INFO] [util.go:209] ["all range generated"]
[2022/06/23 15:55:30.944 +08:00] [INFO] [batcher.go:362] ["sending batch lastly on close"] [size=3]
[2022/06/23 15:55:30.944 +08:00] [INFO] [batcher.go:325] ["restore batch start"] [ranges="{total=3,ranges=\"[\\\"[7480000000000000A85F69800000000000000100, 7480000000000000A85F698000000000000001FB)\\\",\\\"[7480000000000000A85F720000000000000000, 7480000000000000A85F72FFFFFFFFFFFFFFFF00)\\\",\\\"[7480000000000000A55F720000000000000000, 7480000000000000A55F72FFFFFFFFFFFFFFFF00)\\\"]\",totalFiles=3,totalKVs=270,totalBytes=17210,totalSize=17210}"] [tables="[`test`.`tidb_demo`,`peter`.`runoob_tbl`]"]
[2022/06/23 15:55:30.944 +08:00] [INFO] [pipeline_items.go:205] ["restore batch: waiting ranges"] [range=0]
[2022/06/23 15:55:30.945 +08:00] [INFO] [split.go:118] ["get split keys for region"] [len=3] [region=316]
[2022/06/23 15:55:30.945 +08:00] [INFO] [split.go:121] ["split regions"] [region="{ID=316,startKey=endKey=epoch=\"conf_ver:5 version:165 \",peers=\"id:317 store_id:1 ,id:318 store_id:4 ,id:319 store_id:5 \"}"] [keys="{total=3,keys=\"[7480000000000000A85F698000000000000001FB,7480000000000000A85F72FFFFFFFFFFFFFFFF00,7480000000000000AD5F72FFFFFFFFFFFFFFFF00]\"}"] [ranges="{total=3,ranges=\"[\\\"[7480000000000000A85F69800000000000000100, 7480000000000000A85F698000000000000001FB)\\\",\\\"[7480000000000000A85F720000000000000000, 7480000000000000A85F72FFFFFFFFFFFFFFFF00)\\\",\\\"[7480000000000000A55F720000000000000000, 7480000000000000A55F72FFFFFFFFFFFFFFFF00)\\\"]\",totalFiles=3,totalKVs=270,totalBytes=17210,totalSize=17210}"]
[2022/06/23 15:55:30.950 +08:00] [INFO] [split.go:149] ["scattered regions"] [count=3]
[2022/06/23 15:55:30.950 +08:00] [INFO] [split.go:163] ["start to wait for scattering regions"] [regions=3] [take=5.889332ms]
[2022/06/23 15:55:31.052 +08:00] [INFO] [split.go:175] ["waiting for scattering regions done"] [regions=3] [take=102.253223ms]
[202
| username: qizheng | Original post link

Will backing up to a local TiKV directory generate tmp files?