en: add crd-based backup and restore docs#1
Conversation
lilin90
left a comment
There was a problem hiding this comment.
Please take a look at Ran's comments and resolve them. I'll take another review after that. Thanks!
Co-Authored-By: Ran <huangran@pingcap.com>
|
@lilin90 @ran-huang Comments addressed, PTAL again, thanks! |
| - [Maintain a Hosting Kubernetes Node](maintain-a-kubernetes-node.md) | ||
| - [Backup and Restore](backup-and-restore.md) | ||
| + Backup and Restore | ||
| - [Helm Charts-Based Backup and Restoration](backup-and-restore-using-helm-charts.md) |
There was a problem hiding this comment.
| - [Helm Charts-Based Backup and Restoration](backup-and-restore-using-helm-charts.md) | |
| - [Use Helm Charts](backup-and-restore-using-helm-charts.md) |
| - [Backup and Restore](backup-and-restore.md) | ||
| + Backup and Restore | ||
| - [Helm Charts-Based Backup and Restoration](backup-and-restore-using-helm-charts.md) | ||
| + CRD-Based Backup and Restoration |
There was a problem hiding this comment.
| + CRD-Based Backup and Restoration | |
| + Use CRDs |
| title: Backup and Restore | ||
| summary: Learn how to back up and restore the data of TiDB cluster in Kubernetes. | ||
| title: Helm Charts-Based Backup and Restoration | ||
| summary: Learn how to back up and restore the data of TiDB cluster in Kubernetes based on Helm charts. |
There was a problem hiding this comment.
| summary: Learn how to back up and restore the data of TiDB cluster in Kubernetes based on Helm charts. | |
| summary: Learn how to back up and restore data of the TiDB cluster in Kubernetes using Helm charts. |
| --- | ||
|
|
||
| # Backup and Restore | ||
| # Helm Charts-Based Backup and Restoration |
There was a problem hiding this comment.
| # Helm Charts-Based Backup and Restoration | |
| # Backup and Restore Using Helm Charts |
| # Helm Charts-Based Backup and Restoration | ||
|
|
||
| This document describes how to back up and restore the data of a TiDB cluster in Kubernetes. | ||
| This document describes how to back up and restore the data of a TiDB cluster in Kubernetes based on Helm charts. |
There was a problem hiding this comment.
| This document describes how to back up and restore the data of a TiDB cluster in Kubernetes based on Helm charts. | |
| This document describes how to back up and restore the data of a TiDB cluster in Kubernetes using Helm charts. |
| * [Back up Data to S3-Compatible Storage](backup-to-s3.md) | ||
| * [Restore Data from S3-Compatible Storage](restore-from-s3.md) | ||
|
|
||
| TiDB in Kubernetes supports two kinds of backup strategies (based on Helm charts): |
There was a problem hiding this comment.
| TiDB in Kubernetes supports two kinds of backup strategies (based on Helm charts): | |
| TiDB in Kubernetes supports two backup strategies using Helm charts: |
| TiDB in Kubernetes supports two kinds of backup strategies (based on Helm charts): | ||
|
|
||
| * [Full backup](#full-backup) (scheduled or ad-hoc): use [`mydumper`](https://pingcap.com/docs/stable/reference/tools/mydumper) to take a logical backup of the TiDB cluster. | ||
| * [Incremental backup](#incremental-backup): use [`TiDB Binlog`](https://pingcap.com/docs/stable/reference/tidb-binlog/overview) to replicate data in the TiDB cluster to another database or take a real-time backup of the data. |
There was a problem hiding this comment.
| * [Incremental backup](#incremental-backup): use [`TiDB Binlog`](https://pingcap.com/docs/stable/reference/tidb-binlog/overview) to replicate data in the TiDB cluster to another database or take a real-time backup of the data. | |
| * [Incremental backup](#incremental-backup): use [TiDB Binlog](https://pingcap.com/docs/stable/reference/tidb-binlog/overview) to replicate data from the TiDB cluster to another database or execute a real-time backup of the data. |
|
|
||
| # Back up TiDB Cluster Data to GCS | ||
|
|
||
| This document describes how to back up the data of the TiDB cluster in 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). For the underlying implementation, [`mydumper`](https://pingcap.com/docs/stable/reference/tools/mydumper) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS. |
There was a problem hiding this comment.
IMO, this phrase is not necessary.
| This document describes how to back up the data of the TiDB cluster in 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). For the underlying implementation, [`mydumper`](https://pingcap.com/docs/stable/reference/tools/mydumper) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS. | |
| This document describes how to back up the data of the TiDB cluster in 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). [`mydumper`](https://pingcap.com/docs/stable/reference/tools/mydumper) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS. |
|
|
||
| This document describes how to back up the data of the TiDB cluster in 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). For the underlying implementation, [`mydumper`](https://pingcap.com/docs/stable/reference/tools/mydumper) is used to get the logic backup of the TiDB cluster, and then this backup data is sent to the remote GCS. | ||
|
|
||
| The backup method described in this document is implemented based on CustomResourceDefinition (CRD) in TiDB Operator v1.1 or later versions. For the backup method implemented based on Helm Charts, refer to [Back up and Restore TiDB Cluster Data Based on Helm Charts](backup-and-restore-using-helm-charts.md). |
There was a problem hiding this comment.
| The backup method described in this document is implemented based on CustomResourceDefinition (CRD) in TiDB Operator v1.1 or later versions. For the backup method implemented based on Helm Charts, refer to [Back up and Restore TiDB Cluster Data Based on Helm Charts](backup-and-restore-using-helm-charts.md). | |
| The backup method described in this document is implemented using CustomResourceDefinition (CRD) in TiDB Operator v1.1 or later versions. For the backup method implemented using Helm Charts, refer to [Back up and Restore TiDB Cluster Data Using Helm Charts](backup-and-restore-using-helm-charts.md). |
|
|
||
| ### Ad-hoc backup process | ||
|
|
||
| Create the `Backup` CR and back up data to GSC: |
There was a problem hiding this comment.
Suggesting using an ordered list for this section.
| kubectl apply -f backup-gcs.yaml | ||
| ``` | ||
|
|
||
| The `backup-gcs.yaml` file has the following content: |
There was a problem hiding this comment.
- Move this step to the 1st step.
- Update description.
| The `backup-gcs.yaml` file has the following content: | |
| 1. In the `backup-gcs.yaml` file, edit `host`, `port`, `user`, `projectId` and save your changes. |
| kubectl apply -f backup-schedule-gcs.yaml | ||
| ``` | ||
|
|
||
| The `backup-gcs.yaml` file has the following content: |
There was a problem hiding this comment.
| The `backup-gcs.yaml` file has the following content: | |
| The `backup-schedule-gcs.yaml` file has the following content: |
|
|
||
| ### Scheduled backup process | ||
|
|
||
| Create the `BackupSchedule` CR to enable the scheduled full backup to GCS: |
|
|
||
| ### Ad-hoc backup process | ||
|
|
||
| + Create the `Backup` CR and back up data to Amazon S3: |
There was a problem hiding this comment.
Process should organized in an ordered list.
|
@TomShawn I added comments in three batches and will have another review after they are addressed. |
|
@lilin90 Comments addressed, PTAL again, thanks! |
backup: add backup to aws s3 doc
What is changed, added or deleted? (Required)
This PR is migrated from pingcap/docs#1945:
Which TiDB Operator version(s) do your changes apply to? (Required)
If you select two or more versions from above, to trigger the bot to cherry-pick this PR to your desired release version branch(es), you must add corresponding labels such as needs-cherry-pick-1.1 and needs-cherry-pick-1.0.
What is the related PR or file link(s)?