Skip to content

en: add crd-based backup and restore docs#1

Merged
lilin90 merged 13 commits into
pingcap:masterfrom
TomShawn:crd-back-restore
Mar 26, 2020
Merged

en: add crd-based backup and restore docs#1
lilin90 merged 13 commits into
pingcap:masterfrom
TomShawn:crd-back-restore

Conversation

@TomShawn
Copy link
Copy Markdown
Contributor

@TomShawn TomShawn commented Mar 11, 2020

What is changed, added or deleted? (Required)

This PR is migrated from pingcap/docs#1945:

  • Add CRD-based backup and restoration documents for TiDB Operator v1.1.
  • Change the title of the original backup-and-restore document.

Which TiDB Operator version(s) do your changes apply to? (Required)

  • master (the latest development version, including v1.1 changes for now)
  • v1.0 (TiDB Operator 1.0 versions)

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)?

@TomShawn TomShawn added size/large Changes of a large size. translation/from-zh This PR is translated from a PR in docs-tidb-operator/zh. labels Mar 11, 2020
@TomShawn TomShawn requested review from lilin90 and onlymellb March 11, 2020 07:17
Comment thread en/TOC.md Outdated
@ran-huang ran-huang self-requested a review March 16, 2020 09:47
Comment thread en/backup-and-restore-using-helm-charts.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-gcs.md Outdated
Comment thread en/backup-to-s3.md
Comment thread en/backup-to-s3.md Outdated
Comment thread en/backup-to-s3.md Outdated
Comment thread en/backup-to-s3.md Outdated
Comment thread en/backup-to-s3.md Outdated
Comment thread en/restore-from-gcs.md Outdated
Comment thread en/restore-from-s3.md Outdated
Comment thread en/restore-from-s3.md Outdated
Comment thread en/restore-from-s3.md Outdated
Comment thread zh/backup-and-restore-using-helm-charts.md Outdated
Copy link
Copy Markdown
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at Ran's comments and resolve them. I'll take another review after that. Thanks!

TomShawn and others added 2 commits March 17, 2020 20:55
Co-Authored-By: Ran <huangran@pingcap.com>
@TomShawn
Copy link
Copy Markdown
Contributor Author

@lilin90 @ran-huang Comments addressed, PTAL again, thanks!

Comment thread en/TOC.md Outdated
- [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)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- [Helm Charts-Based Backup and Restoration](backup-and-restore-using-helm-charts.md)
- [Use Helm Charts](backup-and-restore-using-helm-charts.md)

Comment thread en/TOC.md Outdated
- [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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
+ 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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* [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.

Comment thread en/backup-to-gcs.md Outdated

# 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.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, this phrase is not necessary.

Suggested change
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.

Comment thread en/backup-to-gcs.md Outdated

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).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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).

Comment thread en/backup-to-gcs.md Outdated

### Ad-hoc backup process

Create the `Backup` CR and back up data to GSC:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggesting using an ordered list for this section.

Comment thread en/backup-to-gcs.md Outdated
kubectl apply -f backup-gcs.yaml
```

The `backup-gcs.yaml` file has the following content:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Move this step to the 1st step.
  • Update description.
Suggested change
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.

Comment thread en/backup-to-gcs.md Outdated
kubectl apply -f backup-schedule-gcs.yaml
```

The `backup-gcs.yaml` file has the following content:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The `backup-gcs.yaml` file has the following content:
The `backup-schedule-gcs.yaml` file has the following content:

Comment thread en/backup-to-gcs.md Outdated

### Scheduled backup process

Create the `BackupSchedule` CR to enable the scheduled full backup to GCS:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto for this section.

Comment thread en/backup-to-s3.md Outdated

### Ad-hoc backup process

+ Create the `Backup` CR and back up data to Amazon S3:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Process should organized in an ordered list.

@lilin90
Copy link
Copy Markdown
Member

lilin90 commented Mar 18, 2020

@TomShawn I added comments in three batches and will have another review after they are addressed.

Comment thread en/backup-to-s3.md
Comment thread en/backup-to-s3.md
@TomShawn
Copy link
Copy Markdown
Contributor Author

@lilin90 Comments addressed, PTAL again, thanks!

Comment thread en/backup-to-gcs.md
DanielZhangQD pushed a commit that referenced this pull request Mar 26, 2020
Copy link
Copy Markdown
Member

@lilin90 lilin90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lilin90 lilin90 merged commit 165e468 into pingcap:master Mar 26, 2020
@lilin90 lilin90 added the v1.1 This PR/issue applies to TiDB Operator v1.1. label Mar 26, 2020
@TomShawn TomShawn deleted the crd-back-restore branch March 30, 2020 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/large Changes of a large size. translation/from-zh This PR is translated from a PR in docs-tidb-operator/zh. v1.1 This PR/issue applies to TiDB Operator v1.1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants