restic: Add notification

Notifies double for each prune/check run which may need to be fixed.
Also custom notification contents cannot currently be passed.

Lastly, we should put identifying information into the notification body
(such as the hostname/container name for which the notification is
relevant).
This commit is contained in:
Marty Oehme 2025-07-18 15:12:19 +02:00
parent 003cf64a77
commit fab6f5ff7c
Signed by: Marty
GPG key ID: 4E535BC19C61886E
3 changed files with 84 additions and 9 deletions

View file

@ -55,3 +55,15 @@ restic_check_args: --read-data-subset=5%
The default check cronjob schedule and arguments:
Check the repository integrity every day at 5:15 AM and in addition to structural checks,
read 5 randomly chosen % for a data integrity check.
```yaml
restic_notify_success:
restic_notify_failure:
restic_notify_exit:
```
If restic should notify the user on success/failure/exit (i.e. any outcome process finish).
Defaults to no notifications.
Uses Apprise and thus takes an [apprise URL](https://github.com/caronc/apprise/wiki) in the form of `ntfy://my-ntfy-channel`.
Setting one of these configures _both_ the prune and the check to notify the user if either is done,
so currently any success (failure/exit) notification would be doubled for each sucess (failure/exit).