Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion br/br-snapshot-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ When you perform a snapshot backup, BR backs up system tables as tables with the

**BR does not restore the following system tables:**

- Statistics tables (`mysql.stat_*`). But statistics can be restored. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
- Statistics tables (`mysql.stats_*`). However, statistics can still be restored separately. BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Minor · Functional Correctness · Quick win

Scope the statistics-table exclusion to the logical restore path.

The "BR does not restore" list states that statistics tables are never restored. The guide and manual also say that --fast-load-sys-tables restores them physically on an eligible restore to a new cluster. Add that condition to the list item, and keep the separate-restore note.

The FAQ list at faq/backup-and-restore-faq.md:285 has the same unqualified statement. Apply the same wording there.

Suggested wording for br/br-snapshot-guide.md

--- "a/br/br-snapshot-guide.md"
+++ "b/br/br-snapshot-guide.md"
@@ -173,7 +173,7 @@
 
 **BR does not restore the following system tables:**
 
-- Statistics tables (`mysql.stats_*`). However, statistics can still be restored separately. BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
+- Statistics tables (`mysql.stats_*`), unless `--fast-load-sys-tables` restores them physically on an eligible restore to a new cluster. Statistics can also be restored separately: BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
 - System variable tables (`mysql.tidb` and `mysql.global_variables`)
 - Other system tables
 
Committable suggestion

IMPORTANT
Review the replacement and indentation, then test before committing.

Suggested change
- Statistics tables (`mysql.stats_*`). However, statistics can still be restored separately. BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
- Statistics tables (`mysql.stats_*`), unless `--fast-load-sys-tables` restores them physically on an eligible restore to a new cluster. Statistics can also be restored separately: BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).

- System variable tables (`mysql.tidb` and `mysql.global_variables`)
- Other system tables

Expand Down
2 changes: 1 addition & 1 deletion br/br-snapshot-manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ tiup br restore full \

In the preceding command:

- `--with-sys-table`: BR restores **data in some system tables**, including account permission data and SQL bindings, and statistics (see [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics)). However, it does not restore statistics tables (`mysql.stat_*`) and system variable tables (`mysql.tidb` and `mysql.global_variables`). For more information, see [Restore tables in the `mysql` schema](/br/br-snapshot-guide.md#restore-tables-in-the-mysql-schema).
- `--with-sys-table`: BR restores **data in some system tables**, including account permission data and SQL bindings. Statistics are controlled separately: BR backs them up only when `--ignore-stats=false` and restores them according to `--load-stats`. The `--with-sys-table` option does not restore the statistics tables (`mysql.stats_*`) or the system variable tables (`mysql.tidb` and `mysql.global_variables`). For more information, see [Restore tables in the `mysql` schema](/br/br-snapshot-guide.md#restore-tables-in-the-mysql-schema).
- `--ratelimit`: The maximum speed **per TiKV** performing restore tasks. The unit is in MiB/s.
- `--log-file`: The target file where the `br` log is written.

Expand Down
2 changes: 1 addition & 1 deletion faq/backup-and-restore-faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ br restore full -f 'mysql.usertable' -s $external_storage_url --with-sys-table

Note that even if you configure [table filter](/table-filter.md#syntax), **BR does not restore the following system tables**:

- Statistics tables (`mysql.stat_*`). But statistics can be restored. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
- Statistics tables (`mysql.stats_*`). However, statistics can still be restored separately. BR backs up statistics only when `--ignore-stats=false` and restores them according to `--load-stats`. See [Back up statistics](/br/br-snapshot-manual.md#back-up-statistics).
- System variable tables (`mysql.tidb`, `mysql.global_variables`)
- Other system tables. For more details, see [Restore tables in the `mysql` schema system tables](/br/br-snapshot-guide.md#restore-tables-in-the-mysql-schema).

Expand Down
Loading