Open ftwegner opened 2 years ago
Having some documented "hooks" .sh scripts that are called optionally if linked or placed inside the container would be fine I guess. It should not change the default behavior if someone do not want to use any hooks.
PR is welcome.
I like to have a hook to insert a script which runs before a notification email is sent.
Motivation: I like to see the total space occupied by all restic snapshots on the target server. I need this, because my target server has a quota, and I like to make sure I do not exceed the quota with the backup snapshots. As a hack-y workaround I modified /bin/backup and inserted four lines before the notifications are generated when I do rclone backups via sftp:
This is for my web space at Domain Factory's ManagedHosting 64 Medium which contains ssh access. It has a 50 GB quota. The snapshots are in the sub-folder "restic/". The generated text in the email I get ends with:
Of course, it would be much nicer and more sustainable to have this built in. And maybe there is a much more elegant way to find out if I get close to exceeding the available space on the target medium?