Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Can't restore system tables separately without restoring user tables #1197

Closed
fubinzh opened this issue Jun 10, 2021 · 1 comment
Closed
Assignees

Comments

@fubinzh
Copy link

fubinzh commented Jun 10, 2021

Please answer these questions before submitting your issue. Thanks!

  1. What did you do?
    If possible, provide a recipe for reproducing the error.

a. Run "br backup full" to create full backup, including system tables and user tables.
b. Run br restore full --filter "mysql*.*" to restore system tables only, (do not restore user tables)

  1. What did you expect to see?
    System tables mysql.* should be restored correctly.

  2. What did you see instead?

br failed to restore system tables. "Nothing to restore" seen in log.

  1. What version of BR and TiDB/TiKV/PD are you using?

br 5.1.0 dev build.
[root@centos76_vm dev]# ./br -V
Release Version: v5.0.0-master-dirty
Git Commit Hash: b9c4ea6
Git Branch: backupmetav2
Go Version: go1.16.5
UTC Build Time: 2021-06-09 12:33:55
Race Enabled: false

  1. Operation logs
    • Please upload br.log for BR if possible
    • Please upload tidb-lightning.log for TiDB-Lightning if possible
    • Please upload tikv-importer.log from TiKV-Importer if possible
    • Other interesting logs

[root@centos76_vm dev]# ./br restore full --pd "172.16.6.183:2379" --filter "mysql*.*" --storage "local:///minio/fubin/tidb510_br510" --log-file full_restore_2_system.log
[2021/06/10 11:38:52.086 +08:00] [INFO] [data_slow_query.go:144] ["Telemetry slow query stats initialized"] [currentSQBInfo={0.512:0,65.536:0,524.288:0,2097.152:0,134217.734:0,33554.434:0,1048.576:0,0.008:0,0.016:0,2.048:0,4.096:0,8.192:0,4194.304:0,0.002:0,16777.217:0,67108.867:0,0.004:0,0.064:0,16.384:0,32.768:0,131.072:0,262.144:0,+Inf:0,0.001:0,0.128:0,0.256:0,0.032:0,1.024:0,8388.608:0] [lastSQBInfo={1048.576:0,0.001:0,0.032:0,0.128:0,0.512:0,4.096:0,524.288:0,2097.152:0,33554.434:0,8.192:0,0.256:0,65.536:0,16777.217:0,0.064:0,2.048:0,+Inf:0,0.002:0,0.004:0,1.024:0,4194.304:0,134217.734:0,0.008:0,131.072:0,262.144:0,8388.608:0,0.016:0,16.384:0,32.768:0,67108.867:0]
Detail BR log in full_restore_2_system.log
[2021/06/10 11:38:52.229 +08:00] [INFO] [collector.go:66] ["Full restore success summary"] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0] [total-take=119.928823ms] [Result="Nothing to restore"]

==full_restore_2_system.log==
[2021/06/10 11:38:52.204 +08:00] [INFO] [client.go:195] ["load backupmeta"] [databases=2] [jobs=0]
[2021/06/10 11:38:52.212 +08:00] [INFO] [import.go:242] ["multi ingest support"] [support=true]
[2021/06/10 11:38:52.218 +08:00] [WARN] [restore.go:530] ["set max-index-length to max(3072*4) to skip check index length in DDL"]
[2021/06/10 11:38:52.218 +08:00] [INFO] [restore.go:315] ["nothing to restore, all databases and tables are filtered out"]

  1. Configuration of the cluster and the task

    • tidb-lightning.toml for TiDB-Lightning if possible
    • tikv-importer.toml for TiKV-Importer if possible
    • topology.yml if deployed by TiUP
  2. Screenshot/exported-PDF of Grafana dashboard or metrics' graph in Prometheus if possible

@fubinzh
Copy link
Author

fubinzh commented Jun 10, 2021

Tried to restore single system table (mysql.user), also failed with below errors:

=====
[root@centos76_vm dev]# ./br restore table --pd "172.16.6.183:2379" --db mysql --table user --storage "local:///minio/fubin/tidb510_br510" --log-file system_full_backup2.restore_single_table.log
...
Detail BR log in system_full_backup2.restore_single_table.log
[2021/06/10 16:12:30.626 +08:00] [INFO] [collector.go:66] ["Table restore failed summary"] [total-ranges=0] [ranges-succeed=0] [ranges-failed=0]
Error: [database: mysql] has not been backup, please ensure you has input a correct database name: [BR:Common:ErrUndefinedDbOrTable]undefined restore databases or tables

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants