From 7723646c979a7cbf6de13ba794c2132d61bdffb1 Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 Date: Mon, 19 Jul 2021 16:23:22 +0800 Subject: [PATCH 1/2] br/use-br-command-line-tool: supplement br note --- br/use-br-command-line-tool.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index f4687e629cdbd..674c6e6f5e5e6 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -352,6 +352,10 @@ br restore db \ In the above command, `--db` specifies the name of the database to be restored. For descriptions of other options, see [Restore all backup data](#restore-all-the-backup-data)). +> **Note**: +> +> When you are restoring the backup data, the name of the database specified by `--db` must be the same as the one specified by `-- db` when the backup is in progress, otherwise the process fails. The reason is that the metafile `backupmeta` of the backup data records the database name so you can only restore data to the database with the same name. You are recommended to restore the backup data to the database with the same name of another cluster. + ### Restore a table To restore a single table to the cluster, execute the `br restore table` command. To get help on this command, execute `br restore table -h` or `br restore table --help`. From 4b5ceddf18959a2ccfa3db3c20f439951d14178a Mon Sep 17 00:00:00 2001 From: Liuxiaozhen12 <82579298+Liuxiaozhen12@users.noreply.github.com> Date: Thu, 5 Aug 2021 19:48:08 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com> --- br/use-br-command-line-tool.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/br/use-br-command-line-tool.md b/br/use-br-command-line-tool.md index 674c6e6f5e5e6..9087dc710095a 100644 --- a/br/use-br-command-line-tool.md +++ b/br/use-br-command-line-tool.md @@ -352,9 +352,9 @@ br restore db \ In the above command, `--db` specifies the name of the database to be restored. For descriptions of other options, see [Restore all backup data](#restore-all-the-backup-data)). -> **Note**: +> **Note:** > -> When you are restoring the backup data, the name of the database specified by `--db` must be the same as the one specified by `-- db` when the backup is in progress, otherwise the process fails. The reason is that the metafile `backupmeta` of the backup data records the database name so you can only restore data to the database with the same name. You are recommended to restore the backup data to the database with the same name of another cluster. +> When you restore the backup data, the name of the database specified by `--db` must be the same as the one specified by `-- db` in the backup command. Otherwise, the restore fails. This is because the metafile of the backup data ( `backupmeta` file) records the database name, you can only restore data to the database with the same name. The recommended method is to restore the backup data to the database with the same name in another cluster. ### Restore a table