【 TiDB 使用环境】测试
【 TiDB 版本】6.5.4
【复现路径】 备份恢复
【遇到的问题:问题现象及影响】
- 使用tikv当 juicefs 的元数据存储
- 备份tikv
sh backup.sh
Checking updates for component tikv-br... Timedout (after 2s)
Starting component tikv-br: /home/tidb/.tiup/components/tikv-br/v1.1.0/tikv-br backup raw --pd 10.21.9.28:2379 --storage s3://tidb-backup/juicefs-recovery-verify/juicefs-pro-backup-20240304-114051 --s3.endpoint http://10.21.9.31 --log-file log/backupraw-juicefs-pro-20240304114051.log --gcttl=2h --format=raw
Detail BR log in log/backupraw-juicefs-pro-20240304114051.log
Raw backup <------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2024/03/04 11:40:59.103 +08:00] [INFO] [collector.go:67] ["Raw backup success summary"] [total-ranges=344] [ranges-succeed=344] [ranges-failed=0] [backup-total-regions=372] [total-take=5.231582018s] [total-kv=2623767] [total-kv-size=7.289GB] [average-speed=1.393GB/s] [backup-data-size(after-compressed)=821.4MB]
- 恢复数据
Starting component tikv-br: /home/tidb/.tiup/components/tikv-br/v1.1.0/tikv-br restore raw --pd 10.21.8.33:2379 --s3.endpoint http://10.21.9.31 --storage s3://tidb-backup/juicefs-recovery-verify/juicefs-pro-backup-20240304-114051 --log-file restoreraw.log
Detail BR log in restoreraw.log
Raw Restore <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
[2024/03/04 11:41:52.009 +08:00] [INFO] [collector.go:67] ["Raw restore success summary"] [total-ranges=344] [ranges-succeed=344] [ranges-failed=0] [restore-files=344] [total-take=5.044049245s] [restore-data-size(after-compressed)=821.4MB] [total-kv=2623767] [total-kv-size=7.289GB] [average-speed=1.445GB/s]
- juicefs连接恢复的数据
juicefs status tikv://10.21.8.33:2379,10.21.8.34:2379,10.21.8.35:2379/juicefs_prd50
2024/03/04 11:49:22.755933 juicefs[720341] <INFO>: Meta address: tikv://10.21.8.33:2379,10.21.8.34:2379,10.21.8.35:2379/juicefs_prd50 [interface.go:497]
2024/03/04 11:49:22.756290 juicefs[720341] <INFO>: TiKV gc interval is set to 3h0m0s [tkv_tikv.go:84]
2024/03/04 11:49:22.772405 juicefs[720341] <FATAL>: load setting: database is not formatted, please run `juicefs format ...` first [status.go:96]