Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: BR 备份
TIDB BR Backup Issue:
Error: error happen in store 4 at 192.168.136.202:20160: File or directory not found on TiKV Node (store id: 4). work around: please ensure br and tikv nodes share the same storage and the user of br and tikv has the same uid.: [BR:KV:ErrKVStorage] tikv storage occur I/O error
[tidb@es01 ~]$
What should I do? Please advise.
br backup full
–pd “192.168.136.201:2379”
–storage “local:///data1/backup/full_${date}”
–ratelimit 120
–log-file backup_${date}.log
Ensure that the storage paths configured for BR and TiKV nodes are the same.
First, make sure that the paths for BR and TiKV are the same, and also check if the path permissions and ownership are correct. I’ve encountered situations before where the errors reported by the BR tool were not necessarily accurate.
Each machine with TiKV must have the /data1/backup path and the necessary permissions.
Both the PD nodes and TiKV nodes must have the specified backup directory and the necessary permissions.
You need to create a backup directory on each TiKV and also set the appropriate permissions.
It is not recommended to use local disks. You can use NFS, MinIO, or other S3 services. Local disks require each TiKV node to have the specified directory.
BR needs to have a backup directory on each TIKV.
Key points for BR backup:
- Each TiKV node and the node executing BR must have a directory pointed to by the --storage parameter.
- Grant 777 permissions to the above directories for the user executing BR.
Check if the backup directories on each TiKV node are the same and have the appropriate permissions.
The path for each node is the same.
Error: An error occurred in store 4 at 192.168.136.202:20160: File or directory not found on TiKV node (store id: 4). Solution: Please ensure that BR and TiKV nodes share the same storage, and that the users of BR and TiKV have the same UID.
[BR:KV:ErrKVStorage] TiKV storage encountered an I/O error.
BR backup is not conventionally understood as finding a single place to centrally store backup data. The backup is also distributed, so each TiKV needs to be configured with a storage path.
BR needs to have the same backup directory on each TiKV.
Each node needs to have the same directory, otherwise use S3.
Each TiKV machine must have a backup path, and the backup paths must be the same. Additionally, proper permissions are required.