【TiDB 版本】: v4.0.10
【BR 版本】: v4.0.10
【问题描述】:
-
GCS備份皆可成功完成
-
GCS還原完整備份時,出現以下錯誤:
Full restore <----------------------------------------------------------------------------------------------------------------------------------------------------------------> 100.00%
Error: Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/97035c3a-3254-40e1-a092-6f368aa02a0b_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/768b6e79-2480-445f-9cf6-b5635098ad95_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/85450c82-0fc5-4d25-8b03-358dc9ebc15c_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/e79b2bd1-94a5-4094-9b19-ff72b00ed37c_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/e0614ff6-fc09-4e62-97b8-8a27b940a8b9_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/d49ab7c4-c3a5-4c82-838d-2cdc3f981fac_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/9f9c9474-55dc-4115-85da-a89bfe7d7f63_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed; Cannot read gcs://dev_tidb_backup_bucketdev-tidb-backup/20210201/full//7_1298_324_40a8022925f58fe0d69ae3487b5253cba26b6a14014a733d0ff80517beaf6770_1612148082299_write.sst into /tidb-data/tikv-20161/import/.temp/6bdf88cd-339d-4f51-8ba7-3cc865d410db_7857_5_1198_write.sst: authorization failed: HTTP error status: 404 Not Found: [BR:KV:ErrKVDownloadFailed]download sst failed
1. 已透過以下指令成功備份檔案到GCS上
03:00 - 完整備份
br backup full -u x.x.x.x:2379 --gcs.credentials-file /home/tidb/devops-296503-15712d14f89c.json --send-credentials-to-tikv=true -s gcs://dev_tidb_backup_bucket/dev-tidb-backup/20210201/full
09:00 - 遞增備份1
br backup full
–pd x.x.x.x:2379
–gcs.credentials-file /home/tidb/devops-296503-15712d14f89c.json
-s gcs://dev_tidb_backup_bucket/dev-tidb-backup/20210201/incr/20210201_0900_incr
–lastbackupts 422614943718178818
15:00 - 遞增備份2
br backup full
–pd x.x.x.x:2379
–gcs.credentials-file /home/tidb/devops-296503-15712d14f89c.json
-s gcs://dev_tidb_backup_bucket/dev-tidb-backup/20210201/incr/20210201_1500_incr
–lastbackupts 422614965227094018
21:00 - 遞增備份3
br backup full
–pd x.x.x.x:2379
–gcs.credentials-file /home/tidb/devops-296503-15712d14f89c.json
-s gcs://dev_tidb_backup_bucket/dev-tidb-backup/20210201/incr/20210201_2100_incr
–lastbackupts 422614980392124417
2. 還原完整備份
br restore full
–pd “192.168.33.92:2379”
–gcs.credentials-file /home/tidb/DevOps-263cc3791089.json
–send-credentials-to-tikv=true
–storage “gcs://dev_tidb_backup_bucket/dev-tidb-backup/20210201/full/”
–log-file restorefull.log
完整log檔案:
restorefull.log (2.7 MB)
GCP上帳號權限如下:
想請教顧問,這個錯誤訊息是指GCP我們少了什權限?還是TiDB部份有哪邊我們漏掉地方?