Skip to content

Commit 622e555

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 24fb873 + 3c9f232 commit 622e555

28 files changed

+1905
-40
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<!--Tick the checkbox(es) below to choose the TiDB Operator version(s) that your changes apply to.-->
1414

1515
- [ ] master (the latest development version)
16+
- [ ] v2.0 (TiDB Operator 2.0 versions)
1617
- [ ] v1.6 (TiDB Operator 1.6 versions)
1718
- [ ] v1.5 (TiDB Operator 1.5 versions)
1819
- [ ] v1.4 (TiDB Operator 1.4 versions)

.github/workflows/doc_review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ jobs:
276276
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
277277
API_PROVIDER: "openai"
278278
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
279-
OPENAI_API_MODEL: "gpt-4"
279+
OPENAI_API_MODEL: "gpt-4o"
280280
exclude: "**/*.json,zh/**" # Exclude JSON files and Chinese docs
281281
REVIEW_MODE: ${{ needs.prepare.outputs.review_mode }}
282282
COMMIT_SHA: ${{ needs.prepare.outputs.commit_sha }}

doc-review-prompt-en.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Review Guidelines:
1313

1414
- Do NOT give positive comments or compliments.
1515
- Do NOT modify UI strings, CLI messages, or code samples unless there are factual errors.
16+
- Do NOT comment on removed (-) or context ( ) lines.
1617
- Review the documentation structure, logic, content, clarity, accuracy, and readability from the user's perspective.
1718
- Ensure the documentation is easy to understand for TiDB users.
1819
- Ensure the documentation follows the Google developer documentation style guide.
1920
- In general, address the reader of documents using the second person instead of the first person: use "you" or "your" instead of "we", "our", or "us".
20-
- Review the document in the context of the overall user experience and functionality described.
2121
- Provide "reviews" ONLY if there is something to improve. Otherwise, "reviews" should be an empty array.
2222
- Write the review comment in the same language as the documentation.
2323
- For each "suggestion", "<the improved version of the original line>" MUST keep the complete information of the original line, and then make improvements based on that. Do NOT delete any information from the original line.

doc-review-prompt-zh.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313

1414
- 请勿提供正面评价或赞美。
1515
- 请勿改进 UI 字符串或 CLI 返回消息的措辞。
16+
- 对于 removed (-) 或 context ( ) 的行,不需要提供审查意见,即 "reviews" 应为空数组。
1617
- 请审查文档结构是否合理,逻辑是否严密,内容是否完整、清晰、准确、可读性强。
1718
- 请确保文档对于 TiDB 用户来说易于理解。
1819
- 在文档中通常应使用第二人称来称呼读者,而不是第一人称。
19-
- 请根据文档中所描述功能审查文档用户体验是否良好。
2020
- 只在文档里有需要改进的地方才提供 "reviews",否则 "reviews" 应为空数组。
2121
- 审查意见使用中文撰写。
2222
- 对于每一行的 "suggestion","<该行优化后的版本>" 必须保留该行原有的所有内容和信息,在此基础上进行改进,请勿删减。
@@ -41,4 +41,4 @@ ${description}
4141
```diff
4242
${diff_content}
4343
${diff_changes}
44-
```
44+
```

en/TOC.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,22 @@
6363
- Amazon S3 Compatible Storage
6464
- [Back Up Data Using BR](backup-to-aws-s3-using-br.md)
6565
- [Restore Data Using BR](restore-from-aws-s3-using-br.md)
66-
- [Back Up Data Using Dumpling](backup-to-s3.md)
67-
- [Restore Data Using TiDB Lightning](restore-from-s3.md)
66+
- [Back Up Data Using Dumpling](backup-to-s3-using-job.md)
67+
- [Restore Data Using TiDB Lightning](restore-from-s3-using-job.md)
68+
- [Back Up Data Using Dumpling (Deprecated)](backup-to-s3.md)
69+
- [Restore Data Using TiDB Lightning (Deprecated)](restore-from-s3.md)
6870
- Google Cloud Storage
6971
- [Back Up Data Using BR](backup-to-gcs-using-br.md)
7072
- [Restore Data Using BR](restore-from-gcs-using-br.md)
71-
- [Back Up Data Using Dumpling](backup-to-gcs.md)
72-
- [Restore Data Using TiDB Lightning](restore-from-gcs.md)
73+
- [Back Up Data Using Dumpling](backup-to-gcs-using-job.md)
74+
- [Restore Data Using TiDB Lightning](restore-from-gcs-using-job.md)
75+
- [Back Up Data Using Dumpling (Deprecated)](backup-to-gcs.md)
76+
- [Restore Data Using TiDB Lightning (Deprecated)](restore-from-gcs.md)
7377
- Azure Blob Storage
7478
- [Back Up Data Using BR](backup-to-azblob-using-br.md)
7579
- [Restore Data Using BR](restore-from-azblob-using-br.md)
80+
- [Back Up Data Using Dumpling](backup-to-blob-using-job.md)
81+
- [Restore Data Using TiDB Lightning](restore-from-blob-using-job.md)
7682
- Persistent Volumes
7783
- [Back Up Data](backup-to-pv-using-br.md)
7884
- [Restore Data](restore-from-pv-using-br.md)

en/backup-to-blob-using-job.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
---
2+
title: Back Up TiDB Data to Azure Blob Storage Using Dumpling
3+
summary: Learn how to use Dumpling to back up TiDB cluster data to Azure Blob Storage.
4+
---
5+
6+
# Back Up TiDB Data to Azure Blob Storage Using Dumpling
7+
8+
This document describes how to use [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview/) to back up data from a TiDB cluster deployed on Azure AKS to Azure Blob Storage. Dumpling is a data export tool that exports data from TiDB or MySQL in SQL or CSV format for full data backup or export.
9+
10+
## Prepare the Dumpling node pool
11+
12+
You can run Dumpling in an existing node pool or create a dedicated node pool. The following example shows how to create a new node pool. Replace the variables as needed:
13+
14+
- `${clusterName}`: AKS cluster name
15+
- `${resourceGroup}`: Resource group name
16+
17+
```shell
18+
az aks nodepool add --name dumpling \
19+
--cluster-name ${clusterName} \
20+
--resource-group ${resourceGroup} \
21+
--zones 1 2 3 \
22+
--node-count 1 \
23+
--labels dedicated=dumpling
24+
```
25+
26+
## Deploy the Dumpling job
27+
28+
This section describes how to configure, deploy, and monitor Dumpling jobs.
29+
30+
### Configure the Dumpling job
31+
32+
The following is a sample configuration for the Dumpling job. Replace the variables with your specific values as needed:
33+
34+
- `${name}`: Job name
35+
- `${namespace}`: Kubernetes namespace
36+
- `${version}`: Dumpling image version
37+
- For Dumpling parameters, refer to the [Option list of Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview/#option-list-of-dumpling).
38+
39+
```yaml
40+
# dumpling_job.yaml
41+
---
42+
apiVersion: batch/v1
43+
kind: Job
44+
metadata:
45+
name: ${name}
46+
namespace: ${namespace}
47+
labels:
48+
app.kubernetes.io/component: dumpling
49+
spec:
50+
template:
51+
spec:
52+
nodeSelector:
53+
dedicated: dumpling
54+
affinity:
55+
podAntiAffinity:
56+
requiredDuringSchedulingIgnoredDuringExecution:
57+
- labelSelector:
58+
matchExpressions:
59+
- key: app.kubernetes.io/component
60+
operator: In
61+
values:
62+
- dumpling
63+
topologyKey: kubernetes.io/hostname
64+
containers:
65+
- name: ${name}
66+
image: pingcap/dumpling:${version}
67+
command:
68+
- /bin/sh
69+
- -c
70+
- |
71+
/dumpling \
72+
--host=basic-tidb \
73+
--port=4000 \
74+
--user=root \
75+
--password='' \
76+
--s3.region=us-west-2 \
77+
--threads=16 \
78+
--rows=20000 \
79+
--filesize=256MiB \
80+
--database=test \
81+
--filetype=csv \
82+
--output=azure://external/testfolder?account-name=${accountname}&account-key=${accountkey}
83+
restartPolicy: Never
84+
backoffLimit: 0
85+
```
86+
87+
### Create the Dumpling job
88+
89+
Run the following commands to create the Dumpling job. Replace the variables with your specific values as needed:
90+
91+
```shell
92+
export name=dumpling
93+
export version=v8.5.1
94+
export namespace=tidb-cluster
95+
export accountname=<your-account-name>
96+
export accountkey=<your-account-key>
97+
98+
envsubst < dumpling_job.yaml | kubectl apply -f -
99+
```
100+
101+
### Check the Dumpling job status
102+
103+
Run the following command to check the Pod status of the Dumpling job. Replace the variables with your specific values as needed:
104+
105+
```shell
106+
kubectl -n ${namespace} get pod ${name}
107+
```
108+
109+
### View Dumpling job logs
110+
111+
Run the following command to view the logs of the Dumpling job. Replace the variables with your specific values as needed:
112+
113+
```shell
114+
kubectl -n ${namespace} logs pod ${name}
115+
```

en/backup-to-gcs-using-job.md

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: Back Up TiDB Data to Google Cloud Storage (GCS) Using Dumpling
3+
summary: Learn how to use Dumpling to back up TiDB cluster data to Google Cloud Storage (GCS).
4+
---
5+
6+
# Back Up TiDB Data to Google Cloud Storage (GCS) Using Dumpling
7+
8+
This document describes how to use [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview/) to back up data from a TiDB cluster deployed on Google GKE to [Google Cloud Storage (GCS)](https://cloud.google.com/storage/docs). Dumpling is a data export tool that can export data from TiDB or MySQL in SQL or CSV format for full data backup or export.
9+
10+
## Prepare the Dumpling node pool
11+
12+
You can run Dumpling in an existing node pool or create a dedicated node pool. The following example shows how to create a new node pool. Replace the variables as needed:
13+
14+
- `${clusterName}`: GKE cluster name
15+
16+
```shell
17+
gcloud container node-pools create dumpling \
18+
--cluster ${clusterName} \
19+
--machine-type n2-standard-4 \
20+
--num-nodes=1 \
21+
--node-labels=dedicated=dumpling
22+
```
23+
24+
## Deploy the Dumpling job
25+
26+
### Create a credential ConfigMap
27+
28+
Save the `service account key` file downloaded from the Google Cloud Console as `google-credentials.json`, and then create a ConfigMap with the following command:
29+
30+
```shell
31+
kubectl -n ${namespace} create configmap google-credentials --from-file=google-credentials.json
32+
```
33+
34+
### Configure the Dumpling job
35+
36+
The following is a sample configuration file (`dumpling_job.yaml`) for the Dumpling job. Replace the variables as needed:
37+
38+
- `${name}`: job name
39+
- `${namespace}`: Kubernetes namespace
40+
- `${version}`: Dumpling image version
41+
- For Dumpling parameters, refer to the [Option list of Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview/#option-list-of-dumpling).
42+
43+
```yaml
44+
# dumpling_job.yaml
45+
---
46+
apiVersion: batch/v1
47+
kind: Job
48+
metadata:
49+
name: ${name}
50+
namespace: ${namespace}
51+
labels:
52+
app.kubernetes.io/component: dumpling
53+
spec:
54+
template:
55+
spec:
56+
nodeSelector:
57+
dedicated: dumpling
58+
affinity:
59+
podAntiAffinity:
60+
requiredDuringSchedulingIgnoredDuringExecution:
61+
- labelSelector:
62+
matchExpressions:
63+
- key: app.kubernetes.io/component
64+
operator: In
65+
values:
66+
- dumpling
67+
topologyKey: kubernetes.io/hostname
68+
containers:
69+
- name: ${name}
70+
image: pingcap/dumpling:${version}
71+
command:
72+
- /bin/sh
73+
- -c
74+
- |
75+
/dumpling \
76+
--host=basic-tidb \
77+
--port=4000 \
78+
--user=root \
79+
--password='' \
80+
--threads=16 \
81+
--rows=20000 \
82+
--filesize=256MiB \
83+
--database=test \
84+
--filetype=csv \
85+
--output=gcs://external/testfolder?credentials-file=/etc/config/google-credentials.json
86+
volumeMounts:
87+
- name: google-credentials
88+
mountPath: /etc/config
89+
volumes:
90+
- name: google-credentials
91+
configMap:
92+
name: google-credentials
93+
restartPolicy: Never
94+
backoffLimit: 0
95+
```
96+
97+
### Create the Dumpling job
98+
99+
Run the following commands to create the Dumpling job:
100+
101+
```shell
102+
export name=dumpling
103+
export version=v8.5.1
104+
export namespace=tidb-cluster
105+
106+
envsubst < dumpling_job.yaml | kubectl apply -f -
107+
```
108+
109+
### Check the Dumpling job status
110+
111+
Run the following command to check the Pod status of the Dumpling job:
112+
113+
```shell
114+
kubectl -n ${namespace} get pod ${name}
115+
```
116+
117+
### View Dumpling job logs
118+
119+
Run the following command to view the logs of the Dumpling job:
120+
121+
```shell
122+
kubectl -n ${namespace} logs pod ${name}
123+
```

en/backup-to-gcs.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
---
2-
title: Back up Data to GCS Using Dumpling
3-
summary: Learn how to back up the TiDB cluster to GCS (Google Cloud Storage) using Dumpling.
2+
title: Back Up Data to GCS Using Dumpling (Helm)
3+
summary: Learn how to use Helm to back up the TiDB cluster to GCS (Google Cloud Storage) using Dumpling.
44
aliases: ['/docs/tidb-in-kubernetes/dev/backup-to-gcs/']
55
---
66

7-
# Back up Data to GCS Using Dumpling
7+
# Back Up Data to GCS Using Dumpling (Helm)
8+
9+
> **Warning:**
10+
>
11+
> The Helm deployment method described in this document is deprecated. It is recommended to use the [Job method](backup-to-gcs-using-job.md) for backup operations.
812
913
This document describes how to back up the data of the TiDB cluster on Kubernetes to [Google Cloud Storage (GCS)](https://cloud.google.com/storage/docs/). "Backup" in this document refers to full backup (ad-hoc full backup and scheduled full backup).
1014

11-
The backup method described in this document is implemented using CustomResourceDefinition (CRD) in TiDB Operator v1.1 or later versions. [Dumpling](https://docs.pingcap.com/tidb/stable/export-or-backup-using-dumpling) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS.
15+
The backup method described in this document is implemented using CustomResourceDefinition (CRD) in TiDB Operator v1.1 or later versions. [Dumpling](https://docs.pingcap.com/tidb/stable/dumpling-overview/) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS.
1216

1317
Dumpling is a data export tool that exports data stored in TiDB/MySQL as SQL or CSV files and can be used to make a logical full backup or export.
1418

0 commit comments

Comments
 (0)