[docs suggestion] Include examples for notifications #416
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#416
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?
In the hooks section of the sample config, and in the docs, include a line how to do notifications, both for running borgmatic as a user or as root. e.g.
Using single quotes so
\n
will work.Crude examples, can be improved...
EDITED TO ADD:
The
notify-send…
only work when root borgmatic is run manually (sudo -i
thenborgmatic
).If borgmatic is started by systemd, they
run into problems withrequire that insudo
. Ditto storing the date of last backup into a file in/etc/borgmatic
.borgmatic.service
two capabilities are added:CAP_SETUID
andCAP_SETGID
.NOT SURE ABOUT THE SECURITY IMPLICATIONS if capabilites are
EDIT2: A different path (besides repo-specific files?) would be better to allow multiple dates for multiple repos.EDIT3: If borgmatic could evaluate its own
{repository}
, it would allow to easily store something (such as the datetime of the last successful backup) alongside the local repo files, e.g. in/root/{repository}
. Currently this path needs to be set manually inside theconfig.yaml
, because {repository} is not evaluated in a script called from theafter_backup
hook.A workaround is here.
Sorry again for the delay here. My take is that such an example is outside the scope of the borgmatic docs, given how different notifications would have to be for different Linux systems. I know that
notify-send
in particular can be pretty finnicky. But it looks like you've done a fair amount of work documenting how to get it working on your system, which is great!And as mentioned in #420, the
{respository}
variable in action hook commands now works.