Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: 问一个问题控制台中断后备份会自动完成还是中断?
[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachment: Screenshot/Logs/Monitoring]
mysql> show tables;
±------------------------+
| Tables_in_spot_archiver |
±------------------------+
| transfer_record |
±------------------------+
6 rows in set (0.00 sec)
mysql> BACKUP table a
.b TO ‘s3://tidbba’;
SessionId: Your session timed out due to inactivity and has been terminated.
According to the prompt, it was interrupted and will not continue to back up in the background.
It is likely interrupted, just like copying large files on Windows and getting stuck.
show processlist; Take a look
But I feel like it might have been interrupted
This long-running operation can be run independently in screen.
Won’t TiDB run in the background?
The BACKUP
statement will be blocked once it starts executing until the entire backup task is completed, fails, or is canceled. Therefore, a persistent connection is required when executing BACKUP
. To cancel the task, you can execute the KILL TIDB QUERY
statement.
Log in again to execute, or extend the session time.
The Bash session interruption must have failed.
How about opening a Screen to try?
Backup is an experimental feature, right? It’s better to use nohup br.
Manually translated it, and it seems like it was terminated.
Interrupt, will not run in the background.
It’s better to use br. This feature doesn’t seem reliable at the moment.
Interrupting, backing up the table to S3 using BR is more convenient.