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

Warn if backup failed to read tree blob #2978

Merged
merged 1 commit into from
Nov 2, 2020

Conversation

MichaelEischer
Copy link
Member

@MichaelEischer MichaelEischer commented Oct 3, 2020

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

When backup uses a parent snapshot it has to load the tree blobs of that snapshot. Previously a load failure was silently ignored, although a such a failure to load a tree blob indicates repository damage. This PR adds the missing warning message. Depending on whether the tree blob is contained in the index the warning message is either tree 01234567 could not be loaded; the repository could be damaged: <error from backend> or tree 01234567 is not known; the repository could be damaged, run rebuild-index to try to repair it.

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

No that I know.

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

@MichaelEischer MichaelEischer added the category: resilience preventing and recovering from repository problems label Oct 10, 2020
Copy link
Member

@fd0 fd0 left a comment

Choose a reason for hiding this comment

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

Great work, I approve :)

@fd0 fd0 merged commit 445b845 into restic:master Nov 2, 2020
@MichaelEischer MichaelEischer deleted the warn-tree-error branch November 2, 2020 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: resilience preventing and recovering from repository problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants