Skip to content

Conversation

@MichaelEischer
Copy link
Member

@MichaelEischer MichaelEischer commented Jan 6, 2024

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

rclone returns a "not found" error if an internal error occurs while listing a folder. Ignoring this error lets restic erroneously think that there are no files, which can cause prune to wipe the whole repository.

Was the change previously discussed in an issue or on the forum?

Fixes #4612
Regressed in #4400

Checklist

  • I have read the contribution guidelines.
  • I have enabled maintainer edits.
  • I have added tests for all code changes.
  • [ ] I have added documentation for relevant changes (in the manual).
  • There's a new file in changelog/unreleased/ that describes the changes for our users (see template).
  • 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 force-pushed the workaround-rclone-list-errors branch 2 times, most recently from 49986ba to 8b7e699 Compare January 8, 2024 19:48
rclone returns a "not found" error if an internal error occurs while
listing a folder. Ignoring this error lets restic erroneously think that
there are no files, which can cause `prune` to wipe the whole
repository.
@MichaelEischer MichaelEischer force-pushed the workaround-rclone-list-errors branch from 8b7e699 to 2e8de9e Compare January 9, 2024 17:20
Copy link
Member Author

@MichaelEischer MichaelEischer left a comment

Choose a reason for hiding this comment

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

LGTM.

@MichaelEischer MichaelEischer merged commit 7b2de84 into restic:master Jan 9, 2024
@MichaelEischer MichaelEischer deleted the workaround-rclone-list-errors branch January 9, 2024 17:28
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.

restic prune wipes repo if snapshot listing fails

1 participant