Skip to content

fix(backup): don't fail backup when diff reporting fails - #39

Merged
MarcSchuhTNG merged 1 commit into
mainfrom
fix/resilient-diff-reporting
Jul 21, 2026
Merged

fix(backup): don't fail backup when diff reporting fails#39
MarcSchuhTNG merged 1 commit into
mainfrom
fix/resilient-diff-reporting

Conversation

@MarcSchuhTNG

Copy link
Copy Markdown
Collaborator

Diff reporting (added/altered/deleted emails, threshold warnings, monitored folders) runs after the snapshot has been created and verified. Until now a failing restic diff (e.g. a command timeout) raised out of _generate_diff_summary and marked the whole backup as failed, which also suppressed the change notification emails.

_generate_diff_summary now also catches BackupError, so restic-level reporting failures (ResticCommandFailedError, ResticBackupFailedError, SnapshotIDNotFoundError) are logged and turned into a summary string instead of propagating. An otherwise successful backup stays successful.

  • add test_diff_failure_does_not_fail_backup
  • bump version to 0.5.2

Diff reporting (added/altered/deleted emails, threshold warnings, monitored
folders) runs after the snapshot has been created and verified. Until now a
failing `restic diff` (e.g. a command timeout) raised out of
_generate_diff_summary and marked the whole backup as failed, which also
suppressed the change notification emails.

_generate_diff_summary now also catches BackupError, so restic-level reporting
failures (ResticCommandFailedError, ResticBackupFailedError,
SnapshotIDNotFoundError) are logged and turned into a summary string instead of
propagating. An otherwise successful backup stays successful.

- add test_diff_failure_does_not_fail_backup
- bump version to 0.5.2
@MarcSchuhTNG
MarcSchuhTNG requested a review from MarcSchuh as a code owner July 21, 2026 11:03
@MarcSchuhTNG
MarcSchuhTNG merged commit 8ab4b50 into main Jul 21, 2026
6 checks passed
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.

1 participant