before_everything errors notifications #821
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#821
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Hello, devs.
What is the logic/problem behind not firing the
on_error
hook or Apprise (or other)fail:
notification in case of errors inbefore_everything
hook?I'd like to make some preparations (like dumping LUKS headers, backing up my local services running in containers, etc.) only once, and then do the actual backup into multiple repositories (local + offsite). Seems like the
before_everything
(and the cleanup inafter_everything
) is what I need. What is a proper way to be notified about errors on those steps?Should I rely on the scheduling app (systemd timer in my case) to get the notifications? Wouldn't it be more convenient to have all notifications settings in one place (in the borgmatic itself)?
Thanks for filing this!
There's no fundamental reason that
on_error
couldn't trigger whenbefore_everything
errors. The main reason it doesn't happen now is incidental: Theon_error
hook currently triggers on a per-configuration basis, andbefore_everything
happens before the main processing for each configuration file. But it could in theory be altered to triggeron_error
.As for Apprise hook's
fail:
notification getting triggered, it's the same reason:before_everything
happens well before all that Apprise logic kicks in. That could also be changed.As a work-around until this is implemented, yes, you could relying on systemd to notify you of errors.