lab_code: dba_303_lab_ff7
title_en: "TiDB Admin Lab 8: Performing Backup and Restore"
title_zh: "管理 TiDB 实验 8: 备份与还原"
title_ja: "管理 TiDB 演習 8: バックアップと復元"
title_ko: "TiDB 관리 실습 8: 백업 및 복원"
description_en: In this hands-on lab, you will learn how to perform backup and restore operations. Specifically, we will cover how to deploy Backup & Restore, making a full TiDB cluster backup to locally attached storage with Backup & Restore, back up and restore a database to S3 bucket with Backup & Restore, and back up and restore a table to S3 bucket with Backup & Restore.
description_zh: 在这个实验中，您将学习如何执行备份和还原操作。具体来说，我们将介绍如何部署备份和还原、使用备份和还原将完整的 TiDB 集群备份到本地附加存储、使用备份和还原将数据库备份到 S3 存储桶、使用备份和还原将表备份到 S3 存储桶。
description_ja: このハンズオン演習では、バックアップとリストア操作の方法を学びます。具体的には、バックアップとリストアのデプロイ、バックアップとリストアを使用して完全な TiDB クラスタのバックアップをローカルに接続されたストレージに作成する方法、バックアップとリストアを使用してデータベースを S3 バケットにバックアップおよびリストアする方法、バックアップとリストアを使用してテーブルを S3 バケットにバックアップおよびリストアする方法について説明します。
description_ko: 이 실습에서는 백업 및 복원 작업을 수행하는 방법을 배우게 됩니다. 구체적으로, 백업 및 복원을 사용하여 전체 TiDB 클러스터를 로컬에 연결된 스토리지에 백업하고, 백업 및 복원을 사용하여 데이터베이스를 S3 버킷에 백업하고 복원하는 방법, 백업 및 복원을 사용하여 테이블을 S3 버킷에 백업하고 복원하는 방법에 대해 설명합니다.
splash_image_en: https://lab-static.pingcap.com/quick-demo/dba_303_ch09_en.png
splash_image_ja: https://lab-static.pingcap.com/quick-demo/dba_303_ch09_en.png
splash_image_zh: https://lab-static.pingcap.com/quick-demo/dba_303_ch09_en.png
splash_image_ko: https://lab-static.pingcap.com/quick-demo/dba_303_ch09_en.png
external_materials_en:
  - name: "Backup Strategy Deck Template"
    url: https://docs.google.com/presentation/d/1WZQ2qrD25euND66Lc-SuXZOdq8o8ZYXl/edit?slide=id.p1#slide=id.p1
    employee_only: true
  - name: "Backup & Restore Deck Template"
    url: https://docs.google.com/presentation/d/1ZVpZ0iiw79yQwyJCxei6Zp9plgNXXGEN/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_ja:
  - name: "Backup Strategyを運用するデッキテンプレート"
    url: https://docs.google.com/presentation/d/1WZQ2qrD25euND66Lc-SuXZOdq8o8ZYXl/edit?slide=id.p1#slide=id.p1
    employee_only: true
  - name: "Backup & Restoreを運用するデッキテンプレート"
    url: https://docs.google.com/presentation/d/1ZVpZ0iiw79yQwyJCxei6Zp9plgNXXGEN/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_zh:
  - name: "运维 Backup Strategy 演示文稿模板"
    url: https://docs.google.com/presentation/d/1WZQ2qrD25euND66Lc-SuXZOdq8o8ZYXl/edit?slide=id.p1#slide=id.p1
    employee_only: true
  - name: "运维 Backup & Restore 演示文稿模板"
    url: https://docs.google.com/presentation/d/1ZVpZ0iiw79yQwyJCxei6Zp9plgNXXGEN/edit?slide=id.p1#slide=id.p1
    employee_only: true
external_materials_ko:
  - name: "Backup Strategy를 운영하는 데크 템플릿"
    url: https://docs.google.com/presentation/d/1WZQ2qrD25euND66Lc-SuXZOdq8o8ZYXl/edit?slide=id.p1#slide=id.p1
    employee_only: true
  - name: "Backup & Restore를 운영하는 데크 템플릿"
    url: https://docs.google.com/presentation/d/1ZVpZ0iiw79yQwyJCxei6Zp9plgNXXGEN/edit?slide=id.p1#slide=id.p1
    employee_only: true
lab_level: Intermediate
category_en:
  - Database Recovery
category_zh:
  - 数据库恢复
category_ja:
  - データベースの復元
category_ko:
  - 데이터베이스 복구
authors:
  - Fei Dong (CEG)
  - Todd Bao (CEG)
delivery_type: Instructor-Led
tidb_environments:
  - TiDB Self-Managed
tidb_versions:
  - 7.5.1
target_audience:
  - Architect
  - DBA
  - DevOps
regions:
  aws:
    - oregon
    - tokyo
    - singapore
    - frankfurt
credits: 1
credit_redeemable: true
employee_only: false
estimated_duration_minutes: 60

topology:
  - role: monitor
    node_count: 1
    web_ssh: true
    web_ssh_name: "TiUP Control Machine"
    ssh_user: ec2-user
  - role: pd
    node_count: 3
    ssh_user: ec2-user
  - role: kv
    node_count: 3
  - role: db
    node_count: 2
  - role: tiflash
    node_count: 1

requirements:
  - type: "CloudStack"

bootstrap:
  - name: "prepare monitor"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-monitor.sh

  - name: "prepare pd"
    type: "ShellScript"
    target:
      - pd1
      - pd2
    script: ./scripts/prepare-pd.sh

  - name: "prepare tidb"
    type: "ShellScript"
    target:
      - monitor1
    shell: |
      set -e
      sed -i "s|--yes|--yes >> /home/ec2-user/create-cluster-vinput.log 2>\&1|" /home/ec2-user/create-cluster-vinput.sh
      /home/ec2-user/create-cluster-vinput.sh ${TIDB_VERSION} ${REGION_NAME} solution-topology-ten-nodes.yaml

  - name: "prepare steps"
    type: "ShellScript"
    target:
      - monitor1
    script: ./scripts/prepare-steps.sh

features:
  enable_content_explain: false
