Br restore full database recovery successful, but all sizes show as 0 when calculating database size

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: br restore full 恢复数据库成功,但是统计数据库大小时,全部显示为0

| username: Wander

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
[Resource Configuration] Go to TiDB Dashboard - Cluster Info - Hosts and take a screenshot of this page
[Attachments: Screenshots/Logs/Monitoring]

Size Statistics

Restore Command
br restore full --pd “ip:port” --ratelimit 2048 --grpc-keepalive-timeout 20m --storage “local:///tmp” --log-file test.log

Restore Log Display

Note: There are no error messages in tidb, tidb_error.log, and messages logs.

| username: zhanggame1 | Original post link

What’s in the test.log file?

| username: hey-hoho | Original post link

BR is physical recovery. The SQL you mentioned to calculate the database size should be querying the system table, which relies on statistical information. Therefore, you need to collect the table’s statistical information first.

| username: Wander | Original post link

The part about the recovery log, full restore success.

| username: 裤衩儿飞上天 | Original post link

BR in version 4.X does not back up system tables, so a table analysis is needed.

| username: cassblanca | Original post link

Do we need to collect statistical information first and update the system data dictionary?

| username: Wander | Original post link

I’ll give it a try. Thank you.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.