diff --git a/en/backup-to-aws-s3-using-br.md b/en/backup-to-aws-s3-using-br.md index 38f8eae0e..150c950c1 100644 --- a/en/backup-to-aws-s3-using-br.md +++ b/en/backup-to-aws-s3-using-br.md @@ -421,7 +421,7 @@ Because you already created a `Backup` CR named `demo1-log-backup-s3` when you s kubectl edit backup demo1-log-backup-s3 -n backup-test ``` -In the last line of the CR, change the `logSubcommand` to `log-pause`. Then save and quit the editor. The modified content is as follows: +Change the `logSubcommand` to `log-stop`. Then save and quit the editor. The modified content is as follows: ```yaml --- @@ -432,6 +432,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -457,11 +458,13 @@ demo1-log-backup-s3 log Stopped .... Stopped is the terminated state of a log backup CR, you couldn't change the state again, but you still could clean log backup data. + +In v1.5.5 and earlier TiDB Operator versions, you could use the logStop: true/false field to stop or start a task. This field is retained for backward compatibility. #### Clean log backup data -1. Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The priority of all operations is: stop log backup > delete log backup data > start log backup. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. +1. Because you already created a `Backup` CR named `demo1-log-backup-s3` when you started log backup, you can clean the log data backup by modifying the same `Backup` CR. The following example shows how to clean log backup data generated before 2022-10-10T15:21:00+08:00. ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test @@ -478,6 +481,7 @@ Stopped is the terminated state of a log backup CR, you couldn't change the stat namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1 diff --git a/zh/backup-restore-overview.md b/zh/backup-restore-overview.md index 8c59b9c17..251f636dd 100644 --- a/zh/backup-restore-overview.md +++ b/zh/backup-restore-overview.md @@ -78,7 +78,7 @@ kubectl delete backupschedule ${name} -n ${namespace} 如果你使用 v1.1.2 及以前版本,或使用 v1.1.3 及以后版本并将 `spec.cleanPolicy` 设置为 `Delete` 时,TiDB Operator 在删除 CR 时会同时清理备份文件。 -如果你使用v1.5及以后的版本,当你删除CR时,TiDB Operator会尝试自动停止正在运行的日志备份任务。自动停止功能只会停止正常运行的日志备份任务,并不处理错误或者失败的任务。 +如果你使用 v1.5.5, v1.6.1 及以后的版本,当你删除CR时,TiDB Operator 会尝试自动停止正在运行的日志备份任务。自动停止功能只会停止正常运行的日志备份任务,并不处理错误或者失败的任务。 如果你使用基于 AWS EBS 卷快照的备份,并将 `spec.cleanPolicy` 设置为 `Delete` 时,TiDB Operator 在删除 CR 以及清理备份文件的同时删除 AWS 上相关的所有卷快照。 diff --git a/zh/backup-to-aws-s3-using-br.md b/zh/backup-to-aws-s3-using-br.md index 38446da02..153fb7627 100644 --- a/zh/backup-to-aws-s3-using-br.md +++ b/zh/backup-to-aws-s3-using-br.md @@ -417,7 +417,7 @@ demo1-log-backup-s3 log Running .... kubectl edit backup demo1-log-backup-s3 -n backup-test ``` -在 CR 的最后一行,将 logSubcommand 更改为 log-pause。然后保存并退出编辑器。修改后的内容如下: +将 logSubcommand 更改为 log-stop。然后保存并退出编辑器。修改后的内容如下: ```yaml --- @@ -428,6 +428,7 @@ metadata: namespace: backup-test spec: backupMode: log + logSubcommand: log-stop br: cluster: demo1 clusterNamespace: test1 @@ -438,7 +439,6 @@ spec: region: us-west-1 bucket: my-bucket prefix: my-log-backup-folder - logStop: true ``` 可以看到名为 `demo1-log-backup-s3` 的 `Backup` CR 的 `STATUS` 从 `Running` 变成了 `Stopped`: @@ -454,11 +454,13 @@ demo1-log-backup-s3 log Stopped .... Stopped 是日志备份的终止状态,此状态下无法再次更改状态,但你仍然可以清理日志备份的数据。 + +在 v1.5.5 及更早版本的 TiDB Operator 中,可以使用 logStop: true/false 字段来停止或启动任务。此字段为了向后兼容而保留。 #### 清理日志备份数据 -1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。操作激活优先级从高到低分别是停止日志备份任务、删除日志备份数据和开启日志备份任务。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 +1. 由于你在开启日志备份的时候已经创建了名为 `demo1-log-backup-s3` 的 `Backup` CR,因此可以直接更新该 `Backup` CR 的配置,来激活清理日志备份数据的操作。执行如下操作来清理 2022-10-10T15:21:00+08:00 之前的所有日志备份数据。 ```shell kubectl edit backup demo1-log-backup-s3 -n backup-test @@ -475,6 +477,7 @@ Stopped 是日志备份的终止状态,此状态下无法再次更改状态, namespace: backup-test spec: backupMode: log + logSubcommand: log-start/log-pause/log-stop br: cluster: demo1 clusterNamespace: test1