-
Notifications
You must be signed in to change notification settings - Fork 702
BR: refine BR docs #8628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
BR: refine BR docs #8628
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 1612bb1
fix CI introduced by the removal of backup-and-restore-tool.md
shichun-0415 7de024b
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 c2f59fb
Add backup-storage-S3.md
shichun-0415 ecf33b8
translate three docs: azblob, gcs, and deployment
shichun-0415 5bea2e9
translate the rest docs
shichun-0415 037e1de
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 b564c25
Modify after a thorough check
shichun-0415 cd7cb7a
fix CI
shichun-0415 3aa68e9
fix one more CI
shichun-0415 4e6e006
fix anchor
shichun-0415 ef9d2c3
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 bc7b5d3
Update use-br-command-line-tool.md
shichun-0415 49fcd49
Apply suggestions from code review
shichun-0415 02eede8
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 9c983df
Merge branch 'refine-BR' of https://github.com/shichun-0415/docs into…
shichun-0415 8e57589
Apply suggestions from code review
shichun-0415 36dc16b
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 54cec5e
fix link
shichun-0415 fde8b9a
maybe the last CI error
shichun-0415 297acac
Apply suggestions from code review
shichun-0415 f530ddb
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 feedb6e
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 a8ea5a9
address comment
shichun-0415 738f963
fix path
shichun-0415 9b21b36
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 5a6f79d
address comments
shichun-0415 ed181b7
change raw kv to rawkv
shichun-0415 a2603f2
fix ci
shichun-0415 db2816e
fix ci
shichun-0415 0d1ff89
sync from Chinese
shichun-0415 118cde4
Merge remote-tracking branch 'upstream/master' into refine-BR
shichun-0415 b301107
fix two links
shichun-0415 ad345db
Apply suggestions from code review
shichun-0415 af22691
Apply suggestions from code review
shichun-0415 0cf3a39
improve wording
shichun-0415 fe7a4ee
Update br/backup-and-restore-overview.md
shichun-0415 2707b58
Update br/backup-and-restore-faq.md
shichun-0415 723d507
fix plural
shichun-0415 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
shichun-0415 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
 | ||
|
||
## 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). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.