Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

br restore encrypted backup failed "Bad table magic number" #30225

Closed
fubinzh opened this issue Nov 29, 2021 · 4 comments · Fixed by tikv/tikv#11523
Closed

br restore encrypted backup failed "Bad table magic number" #30225

fubinzh opened this issue Nov 29, 2021 · 4 comments · Fixed by tikv/tikv#11523
Assignees
Labels
component/br This issue is related to BR of TiDB. found/automation Found by automation tests severity/critical type/bug This issue is a bug.

Comments

@fubinzh
Copy link

fubinzh commented Nov 29, 2021

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. Prepare test data in TiDB
  2. Run br backup and restore, specify crypter.method and crypter.key
/br  backup  db "-s" "s3://tmp/br-backup-basic5f2db403-d9c1-43ba-8fd2-4708d4a93e29?access-key=minioadmin&secret-access-key=minioadmin&endpoint=http%3a%2f%2fminio.pingcap.net%3a9000&force-path-style=true" "-u" "http://upstream-pd.brie-acceptance--tps-540378-1-915:2379" "--db" "IFRS9" "--use-backupmeta-v2" "--crypter.method" "aes128-ctr" "--crypter.key" "0123456789abcdef0123456789abcdef"

/br  restore  db "-s" "s3://tmp/br-backup-basic5f2db403-d9c1-43ba-8fd2-4708d4a93e29?access-key=minioadmin&secret-access-key=minioadmin&endpoint=http%3a%2f%2fminio.pingcap.net%3a9000&force-path-style=true" "-u" "http://downstream-pd.brie-acceptance--tps-540378-1-915:2379" "--db" "IFRS9" "--crypter.method" "aes128-ctr" "--crypter.key" "0123456789abcdef0123456789abcdef"

2. What did you expect to see? (Required)

br restore should succeed.

3. What did you see instead (Required)

br restore fails.

br log:
[BR:KV:ErrKVDownloadFailed]download sst failed; Engine Engine("Corruption: Bad table magic number: expected 9863518390377041911, found 2044396524680513383 in /var/lib/tikv/data/import/.temp/f4060c3b-e897-44ff-9eb6-59d960a480a2_1254_1_628_write.sst"): [BR:KV:ErrKVDownloadFailed]download sst failed;

Full log:
tests https://tcms.pingcap.net/dashboard/executions/plan/540378 on testbed brie-acceptance--tps-540378-1-915: Failure
artifacts:
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/prometheus.tar
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/upstream-pd-0/pd.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/upstream-tidb-0/tidb.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/upstream-tikv-0/tikv.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/prometheus.tar
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/downstream-pd-0/pd.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/downstream-tidb-0/tidb.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/downstream-tikv-0/tikv.log
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/lightning/tmp.lightning.log*.tar
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/lightning2/tmp.lightning.log*.tar
http://minio.pingcap.net:9000/minio/test-infra-testground/archive/brie-acceptance--tps-540378-1-915/br/tmp.br.log*.tar

4. What is your TiDB version? (Required)

[release-version=v5.4.0-nightly]
[git-hash=4f19445b9dbfcb0a8dd1421401ec38f67b787a8b]
[git-branch=heads/refs/tags/v5.4.0-nightly]
[go-version=go1.16.4]
[utc-build-time="2021-11-28 04:07:36"]

@fubinzh fubinzh added type/bug This issue is a bug. severity/critical component/br This issue is related to BR of TiDB. found/automation Found by automation tests labels Nov 29, 2021
@fubinzh
Copy link
Author

fubinzh commented Nov 30, 2021

This issue only occurs in master build, for v5.3.0, it is OK.

@joccau
Copy link
Member

joccau commented Dec 1, 2021

@fubinzh
Copy link
Author

fubinzh commented Dec 9, 2021

verified, close the issue.

@github-actions
Copy link

github-actions bot commented Dec 9, 2021

Please check whether the issue should be labeled with 'affects-x.y' or 'fixes-x.y.z', and then remove 'needs-more-info' label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/br This issue is related to BR of TiDB. found/automation Found by automation tests severity/critical type/bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants