2021-02-13 23:57:54 +00:00
|
|
|
Enhancement: Add more checks for index and pack files in the `check` command
|
2020-11-01 15:30:20 +00:00
|
|
|
|
2021-02-13 23:57:54 +00:00
|
|
|
The `check` command run with the `--read-data` or `--read-data-subset` options
|
|
|
|
used to only verify only the pack file content - it did not check if the blobs
|
|
|
|
within the pack are correctly contained in the index.
|
2020-11-10 15:22:25 +00:00
|
|
|
|
2021-02-13 23:57:54 +00:00
|
|
|
A check for the latter is now in place, which can print the following error:
|
2020-11-01 15:30:20 +00:00
|
|
|
|
2021-02-13 23:57:54 +00:00
|
|
|
Blob ID is not contained in index or position is incorrect
|
|
|
|
|
|
|
|
Another test is also added, which compares pack file sizes computed from the
|
|
|
|
index and the pack header with the actual file size. This test is able to
|
|
|
|
detect truncated pack files.
|
|
|
|
|
|
|
|
If the index is not correct, it can be rebuilt by using the `rebuild-index`
|
|
|
|
command.
|
|
|
|
|
|
|
|
Having added these tests, `restic check` is now able to detect non-existing
|
|
|
|
blobs which are wrongly referenced in the index. This situation could have
|
|
|
|
lead to missing data.
|
2020-11-10 15:22:25 +00:00
|
|
|
|
2020-11-01 15:30:20 +00:00
|
|
|
https://github.com/restic/restic/pull/3048
|
2020-11-10 15:22:25 +00:00
|
|
|
https://github.com/restic/restic/pull/3082
|