Add context for various hooks. #469
No reviewers
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#469
Loading…
Reference in New Issue
No description provided.
Delete Branch "cyfdecyf/borgmatic:master"
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?
Variables like
repository
are not interpolated in hook command which is a little surprise to me, thus made this PR.Thanks for taking the time to make this PR! Could you describe your use case for this? This "repository" variable looks like it can sometimes contain multiple repositories, which might be a little unexpected given that the behavior is different from the
on_error
hook. In general I'm happy to expand the interpolated variables.. I just want to make sure I understand how they might be consumed in downstream scripts. Appreciate it!My use case is simple. I didn't use any of the monitoring service supported by borgmatic, so I want to send notification for backup start and finish by myself.
Sorry for the delay here! I'm merging this now, but just a heads up that I'm renaming the context variable to
repositories
since it can contain more than one! Thanks.Released in borgmatic 1.5.24.
Another heads up: I'm renaming the context variable back to
repository
in borgmatic 1.6.0 (to be released). This is because #473 changes command hooks to be called on a per-repository basis. The existingrepositories
context variable should continue to work, however.. It will just be deprecated.