Incremental Backup Deletion

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

Original topic: 增量备份删除

| username: liyuntang

[Test Environment] Kubernetes environment with operator version 1.4.6
[TiDB Version] Enterprise Edition 7.1.0
[Reproduction Path] Operations performed that led to the issue

[Encountered Issue: Phenomenon and Impact]

Phenomenon: Using the kubectl delete bk command to delete an incremental backup task, the bk task is deleted, but it still shows as existing in PD.

Issue:
How can I completely delete the incremental backup task (it should not exist in the bk list, and there should be no incremental task information in PD)?

[Resource Configuration] Navigate to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

| username: TiDBer_jYQINSnf | Original post link

kubectl delete bk cleans up the pod, but whether the CLI stops the job depends on the operator implementation.
You can try the above command.

| username: liyuntang | Original post link

This works, thank you.

What I want to know is whether the inability to delete tasks from PD using kubectl delete bk is not supported by all operators, or if it is just not supported by the 1.4.6 version of the operator.

| username: TiDBer_jYQINSnf | Original post link

I haven’t looked at the operator code, so I’m not sure :grin:. In principle, the operator can support this.

| username: liyuntang | Original post link

We are currently using a program to call the interface to operate TiDB. If we handle it using the command line, it is not very friendly to the program. It would be best to have an interface to implement this function.

| username: liyuntang | Original post link

Ok, thank you.

| username: TiDBer_jYQINSnf | Original post link

The br cli should be implementing these operations through RPC communication with PD. You can look through PD’s code to find the RPC.

| username: TiDBer_aaO4sU46 | Original post link

/br log stop --task-name=log-backup, learned something new

| username: mono | Original post link

:muscle: You’re awesome!

| username: mono | Original post link

Running a database in k8s is really asking for trouble!

| username: YuchongXU | Original post link

Stop task

| username: redgame | Original post link

Seeing this architecture again…

| username: TiDBer_5cwU0ltE | Original post link

Consider the possibility of latency. Wait a few minutes and check again.

| username: liyuntang | Original post link

Understood, please provide the Chinese text you need translated.

| username: liyuntang | Original post link

I looked through the relevant logic in the br source code, but it was too complex and the cost of understanding it was too high, so I encapsulated a pod. I used the br name to perform the deletion.

| username: TiDBer_jYQINSnf | Original post link

Sure, you can just start a job. A BR job.

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

666, your method is good. Start a pod.

| username: TiDBer_rvITcue9 | Original post link

Learned.

| username: 小于同学 | Original post link

Create a BR job

| username: kelvin | Original post link

Starting a pod is indeed a good solution.