aboutsummaryrefslogtreecommitdiffstats
path: root/lifeboat.1
diff options
context:
space:
mode:
authorWolfgang Müller2021-04-30 16:52:35 +0200
committerWolfgang Müller2021-04-30 16:52:35 +0200
commit15442e278022a377931774e311e257dc75f1df4c (patch)
tree1483593f5bc522f3c6c2ae092c6cecaeb3b9fa81 /lifeboat.1
parent455ffc5223bead2df4477bdae94d959855f7478f (diff)
downloadlifeboat-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.112
1 files changed, 11 insertions, 1 deletions
diff --git a/lifeboat.1 b/lifeboat.1
index 1cbf61c..5d76ea1 100644
--- a/lifeboat.1
+++ b/lifeboat.1
@@ -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