A large amount of damage, it’s uncertain whether rocksdb can even be opened.
Is it rawkv or txnkv? If it’s rawkv and there’s no transaction, can the data read be used?
tikv-ctl ldb scan --from XXXXXX --to XXXXXXXXXXX --db=tikv/db --column_family=‘write’ --hex
This scans the data in writecf. You can replace ‘write’ with ‘default’ or ‘lock’.
If the db cannot be opened, try dumping the sst, but the data from that is almost unusable because lower-level data might overwrite higher-level data. In other words, keys in level6 sst might have been deleted in level0.
./tikv-ctl ldb dump --path=xx.sst
This is the only way to try. If any random data is somewhat useful to you, you can give it a try.
Is it possible to recover through WAL?
Refer to this article 专栏 - 使用Online unsafe recovery恢复v6.2同城应急集群 | TiDB 社区
Version v6 has online unsafe recovery, which allows for recovery operations.