Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
ca28824
refine BR-part 1
shichun-0415 May 13, 2022
1612bb1
fix CI introduced by the removal of backup-and-restore-tool.md
shichun-0415 May 16, 2022
7de024b
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 May 17, 2022
c2f59fb
Add backup-storage-S3.md
shichun-0415 May 17, 2022
ecf33b8
translate three docs: azblob, gcs, and deployment
shichun-0415 May 24, 2022
5bea2e9
translate the rest docs
shichun-0415 May 31, 2022
037e1de
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 3, 2022
b564c25
Modify after a thorough check
shichun-0415 Jun 3, 2022
cd7cb7a
fix CI
shichun-0415 Jun 3, 2022
3aa68e9
fix one more CI
shichun-0415 Jun 3, 2022
4e6e006
fix anchor
shichun-0415 Jun 6, 2022
ef9d2c3
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 7, 2022
bc7b5d3
Update use-br-command-line-tool.md
shichun-0415 Jun 7, 2022
49fcd49
Apply suggestions from code review
shichun-0415 Jun 10, 2022
02eede8
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 13, 2022
9c983df
Merge branch 'refine-BR' of https://github.com/shichun-0415/docs into…
shichun-0415 Jun 13, 2022
8e57589
Apply suggestions from code review
shichun-0415 Jun 13, 2022
36dc16b
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 13, 2022
54cec5e
fix link
shichun-0415 Jun 13, 2022
fde8b9a
maybe the last CI error
shichun-0415 Jun 13, 2022
297acac
Apply suggestions from code review
shichun-0415 Jun 21, 2022
f530ddb
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 22, 2022
feedb6e
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 24, 2022
a8ea5a9
address comment
shichun-0415 Jun 24, 2022
738f963
fix path
shichun-0415 Jun 24, 2022
9b21b36
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 27, 2022
5a6f79d
address comments
shichun-0415 Jun 27, 2022
ed181b7
change raw kv to rawkv
shichun-0415 Jun 27, 2022
a2603f2
fix ci
shichun-0415 Jun 27, 2022
db2816e
fix ci
shichun-0415 Jun 27, 2022
0d1ff89
sync from Chinese
shichun-0415 Jun 27, 2022
118cde4
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 Jun 27, 2022
b301107
fix two links
shichun-0415 Jun 27, 2022
ad345db
Apply suggestions from code review
shichun-0415 Jun 28, 2022
af22691
Apply suggestions from code review
shichun-0415 Jun 28, 2022
0cf3a39
improve wording
shichun-0415 Jun 28, 2022
fe7a4ee
Update br/backup-and-restore-overview.md
shichun-0415 Jun 28, 2022
2707b58
Update br/backup-and-restore-faq.md
shichun-0415 Jun 29, 2022
723d507
fix plural
shichun-0415 Jun 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,9 @@
- [Use TiUP (Recommended)](/scale-tidb-using-tiup.md)
- [Use TiDB Operator](https://docs.pingcap.com/tidb-in-kubernetes/stable/scale-a-tidb-cluster)
- Backup and Restore
- Use BR Tool (Recommended)
- [BR Tool Overview](/br/backup-and-restore-tool.md)
- [Use BR Command-line for Backup and Restoration](/br/use-br-command-line-tool.md)
- [BR Use Cases](/br/backup-and-restore-use-cases.md)
- External Storages
- [External Storages Overview](/br/backup-and-restore-storages.md)
- [Back up and Restore Data on Azure Blob Storage](/br/backup-and-restore-azblob.md)
- BR Features
- [Auto Tune](/br/br-auto-tune.md)
- [Batch Create Table](/br/br-batch-create-table.md)
- [BR FAQ](/br/backup-and-restore-faq.md)
- [Use BR to Back Up Cluster Data](/br/br-usage-backup.md)
- [Use BR to Restore Cluster Data](/br/br-usage-restore.md)
- [BR Use Cases](/br/backup-and-restore-use-cases.md)
- [Configure Time Zone](/configure-time-zone.md)
- [Daily Checklist](/daily-check.md)
- [Maintain TiFlash](/tiflash/maintain-tiflash.md)
Expand Down Expand Up @@ -454,13 +446,23 @@
- [Handle Errors](/dm/dm-error-handling.md)
- [Release Notes](/dm/dm-release-notes.md)
- Backup & Restore (BR)
- [BR Tool Overview](/br/backup-and-restore-tool.md)
- [Use BR Command-line for Backup and Restoration](/br/use-br-command-line-tool.md)
- [BR Overview](/br/backup-and-restore-overview.md)
- [Deploy and Use BR](/br/br-deployment.md)
- [Use BR to Back Up Cluster Data](/br/br-usage-backup.md)
- [Use BR to Restore Cluster Data](/br/br-usage-restore.md)
- [BR Use Cases](/br/backup-and-restore-use-cases.md)
- [External Storages](/br/backup-and-restore-storages.md)
- BR Features
- [Auto Tune](/br/br-auto-tune.md)
- [BR FAQ](/br/backup-and-restore-faq.md)
- [Batch Create Table](/br/br-batch-create-table.md)
- References
- [BR Design Principles](/br/backup-and-restore-design.md)
- [BR Command-line](/br/use-br-command-line-tool.md)
- [External Storages](/br/backup-and-restore-storages.md)
- [Back Up and Restore Data on Amazon S3 Using BR](/br/backup-storage-S3.md)
- [Back Up and Restore Data on Azure Blob Storage Using BR](/br/backup-storage-azblob.md)
- [Back Up and Restore Data on Google Cloud Storage Using BR](/br/backup-storage-gcs.md)
- [Back Up and Restore RawKV](/br/rawkv-backup-and-restore.md)
- [BR FAQs](/br/backup-and-restore-faq.md)
- TiDB Binlog
- [Overview](/tidb-binlog/tidb-binlog-overview.md)
- [Quick Start](/tidb-binlog/get-started-with-tidb-binlog.md)
Expand Down
2 changes: 1 addition & 1 deletion _index.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Designed for the cloud, TiDB provides flexible scalability, reliability and secu

- [Upgrade TiDB Using TiUP](/upgrade-tidb-using-tiup.md)
- [Scale TiDB Using TiUP](/scale-tidb-using-tiup.md)
- [Back up and Restore Data](/br/backup-and-restore-tool.md)
- [Back up and Restore Data](/br/backup-and-restore-overview.md)
- [Deploy and Manage TiCDC](/ticdc/manage-ticdc.md)
- [Maintain TiDB Using TiUP](/maintain-tidb-using-tiup.md)
- [Maintain TiFlash](/tiflash/maintain-tiflash.md)
Expand Down
163 changes: 0 additions & 163 deletions br/backup-and-restore-azblob.md

This file was deleted.

43 changes: 43 additions & 0 deletions br/backup-and-restore-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: BR Design Principles
summary: Learn about the design details of BR.
---

# BR Design Principles

This document describes the design principles of Backup & Restore (BR), including its architecture and backup files.

## BR architecture

BR sends a backup or restoration command to each TiKV node. After receiving the command, TiKV performs the corresponding backup or restoration operation.

Each TiKV node has a path in which the backup files generated in the backup operation are stored and from which the stored backup files are read during the restoration.

![br-arch](/media/br-arch.png)

## Backup files

This section describes the design of backup files generated by BR.

### Types of backup files

BR can generate the following types of backup files:

- `SST` file: stores the data that the TiKV node backs up.
- `backupmeta` file: stores the metadata of a backup operation, including the number, the key range, the size, and the Hash (sha256) value of the backup files.
- `backup.lock` file: prevents multiple backup operations from storing data to the same directory.

### Naming format of SST files

SST files are named in the format of `storeID_regionID_regionEpoch_keyHash_cf`. The fields in the format are explained as follows:

- `storeID` is the TiKV node ID.
- `regionID` is the Region ID.
- `regionEpoch` is the version number of a Region.
- `keyHash` is the Hash (sha256) value of the startKey of a range, which ensures the uniqueness of a key.
- `cf` indicates the Column Family of RocksDB (`default` or `write` by default).

### Storage format of SST files

- For details about the storage format of SST files, see [Rocksdb BlockBasedTable Format](https://github.com/facebook/rocksdb/wiki/Rocksdb-BlockBasedTable-Format).
- For details about the encoding format of backup data in SST files, see [Mapping of table data to Key-Value](/tidb-computing.md#mapping-of-table-data-to-key-value).
Loading