Skip to content

check: Add option --read-data-from#3203

Closed
aawsome wants to merge 2 commits intorestic:masterfrom
aawsome:check-read-data-from
Closed

check: Add option --read-data-from#3203
aawsome wants to merge 2 commits intorestic:masterfrom
aawsome:check-read-data-from

Conversation

@aawsome
Copy link
Copy Markdown
Contributor

@aawsome aawsome commented Dec 30, 2020

What does this PR change? What problem does it solve?

Adds an option to check to read the pack files to be checked from a file.
This is handy to control which files are actually read by check. Also allows to only check a few pack files in troubleshooting cases without needing to download all pack files (which might be very expensive and time-consuming)

Was the change discussed in an issue or in the forum before?

see #3202
In the forum there was a discussion (don't find it right now) where a user wanted to troubleshoot some corrupt pack file but rejected to run a full check --read-data as this would cost too much...

Checklist

  • I have read the Contribution Guidelines
  • I have enabled maintainer edits for this PR
  • I have added tests for all changes in this PR
  • I have added documentation for the changes (in the manual)
  • There's a new file in changelog/unreleased/ that describes the changes for our users (template here)
  • I have run gofmt on the code in all commits
  • All commit messages are formatted in the same style as the other commits in the repo
  • I'm done, this Pull Request is ready for review

@aawsome aawsome changed the title Check: Add option --read-data-from check: Add option --read-data-from Dec 30, 2020
@aawsome aawsome force-pushed the check-read-data-from branch from 1a36f86 to 64a9b14 Compare January 3, 2021 14:00
@aawsome
Copy link
Copy Markdown
Contributor Author

aawsome commented Jan 3, 2021

Added some parameter checks, docu and a changelog file.

Comment on lines +3 to +7
Restic check used to check either all packfiles or a subset that is chosen
either in a deterministic or random way but did not allow to specify the pack
files to check directly.
This feature is now added. It allows to fine-tune the checking process or support
troubleshooting in case of corrupted repositories.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
Restic check used to check either 1) all packfiles or 2) a subset of the packfiles.
The subset was chosen either a) deterministically or b) randomly.
This feature adds the possibility to provide an explicit list of pack files, thereby making it possible to fine-tune the checking process when, for example, troubleshooting in case of corrupted repositories.

@nsubtil
Copy link
Copy Markdown

nsubtil commented Jun 12, 2021

This feature would be quite useful. Is this PR on track to get merged?

1 similar comment
@svolence
Copy link
Copy Markdown

This feature would be quite useful. Is this PR on track to get merged?

@someplaceguy
Copy link
Copy Markdown

This PR doesn't seem to apply cleanly anymore, but it was trivial to fix the conflicts in restic 0.15.2 (I haven't tried 0.16.0 or even the master branch).

I also tested the PR by checking one blob which I suspected was corrupted and AFAICT it worked fine.

I hope the PR gets merged as this functionality seems to be extremely useful to efficiently check whether some blobs have been corrupted or not (e.g. after restic gives an error message).

@aawsome aawsome closed this Feb 24, 2024
@aawsome aawsome deleted the check-read-data-from branch February 24, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants