Will the backup automatically complete or be interrupted if the console is interrupted?

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

Original topic: 问一个问题控制台中断后备份会自动完成还是中断?

| username: tidb狂热爱好者

[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.

| username: WalterWj | Original post link

Session timed out?
:thinking:

| username: TiDB_C罗 | Original post link

According to the prompt, it was interrupted and will not continue to back up in the background.

| username: TiDBer_5cwU0ltE | Original post link

It is likely interrupted, just like copying large files on Windows and getting stuck.

| username: YuchongXU | Original post link

Interrupted

| username: onlyacat | Original post link

show processlist; Take a look
But I feel like it might have been interrupted

| username: chnage | Original post link

This long-running operation can be run independently in screen.

| username: tidb狂热爱好者 | Original post link

Won’t TiDB run in the background?

| username: tidb狂热爱好者 | Original post link

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.

| username: No_Fear | Original post link

Log in again to execute, or extend the session time.

| username: ffeenn | Original post link

The Bash session interruption must have failed.

| username: 这里介绍不了我 | Original post link

How about opening a Screen to try?

| username: TiDBer_aaO4sU46 | Original post link

It will be interrupted.

| username: redgame | Original post link

Interrupt.

| username: tidb菜鸟一只 | Original post link

Backup is an experimental feature, right? It’s better to use nohup br.

| username: Kongdom | Original post link

Manually translated it, and it seems like it was terminated.

| username: zhang_2023 | Original post link

Interrupt, will not run in the background.

| username: DBAER | Original post link

Use screen

| username: zhanggame1 | Original post link

It’s better to use br. This feature doesn’t seem reliable at the moment.

| username: GreenGuan | Original post link

Interrupting, backing up the table to S3 using BR is more convenient.