diff options
author | Wolfgang Müller | 2021-04-30 16:52:35 +0200 |
---|---|---|
committer | Wolfgang Müller | 2021-04-30 16:52:35 +0200 |
commit | 15442e278022a377931774e311e257dc75f1df4c (patch) | |
tree | 1483593f5bc522f3c6c2ae092c6cecaeb3b9fa81 /lifeboat.1 | |
parent | 455ffc5223bead2df4477bdae94d959855f7478f (diff) | |
download | lifeboat-15442e278022a377931774e311e257dc75f1df4c.tar.gz |
Add command to mail the output of a backup run
This commit introduces the 'run-report' command and a new config file
'config/recipient' which indicates the recipient of the report.
Since lifeboat was always intended to be run via a cronjob, we assumed
mail functionality would come from the specific crond implementation.
This is well-supported throughout, but not a feature that systemd's
timers (yet?) have. Since one of our systems is now running systemd, we
needed a decent alternative.
A wrapper script was considered, but at that point we could also just as
simply include mail support in lifeboat itself. We have chosen to
implement this by calling out to sendmail, which seems to be a de-facto
standard (postfix has sendmail compatibility, as does msmtp). It should
be available on a wide range of systems.
For now, hardcode the message headers and send mail to one recipient
only. Set the X-Report header for simple filtering by mail clients.
Diffstat (limited to 'lifeboat.1')
-rw-r--r-- | lifeboat.1 | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -1,4 +1,4 @@ -.Dd January 17, 2020 +.Dd April 30, 2021 .Dt LIFEBOAT 1 .Os .Sh NAME @@ -24,6 +24,11 @@ or as follows: .Bl -tag -width Ds .It Sy run Create a snapshot for the specified repository. +.It Sy run-report +Like +.Sy run , +but send any program output to the mail address specified in +.Pa config/recipient . .El .Sh DIRECTORY STRUCTURE .Nm @@ -78,6 +83,11 @@ if the combined size of the repository is below 10G: .Bd -literal -offset indent nas:backups/ 10485760 .Ed +.It Sy config/recipient +A file containing the mail address of the recipient for backup reports. +Only needed for the +.Sy run-report +command. .It Sy credentials/restic A file containing the password for the .Xr restic 1 |