Tune verbose check output to be suitable for email report #31
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#31
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?
Hi I'm using borgmatic with systemd on archlinux. Unfortunately it's not so easy to convince systemd to send an email after running the backup job ... so I wonder if you would consider adding notification functionality to borgmatic?
Imported from Taiga issue 30 (to do). Created on 2017-07-06T15:26:08+0000 by Markus Hubig.
What sort of notifications are you looking for? Completion? Only failure? And what content would you expect to see in the emails?
Comment on 2017-07-23T05:00:52+0000 by Dan Helfman.
Failure and Completion. The
-v 1
output would be sufficient.A really cool option would be to be able to only send failure notifications, but to be able to run
borgmatic
in acheck only mode
where it would not make a backup, but instead sends a notification containing the-v 1
or-v 2
output.This way I could schedule it to make the daily backups and notify me on failures. And once a week I would get an overview on the state of my backup archive ...
Comment on 2017-07-25T16:13:08+0000 by Markus Hubig.
Interesting idea.. Might have some overlap with https://tree.taiga.io/project/witten-borgmatic/issue/17 .. I've mentioned it there.
Comment on 2017-07-29T03:45:28+0000 by Dan Helfman.
Check-only mode is implemented in borgmatic 1.1.4 with three new flags: "--prune", "--create", and "--check". So you can configure one cron job with "--prune --create" and a separate job with a different frequency with just "--check". Or mix and match those flags how ever you like. Thanks for the suggestion!
I still haven't implemented the email portion of this ticket, however.
Comment on 2017-07-29T05:26:21+0000 by Dan Helfman.
I'll tried those variants:
but found that
-v 1
and-v 2
produce almost the same output and the third variant produces no output at all.Checking segments
stuff?-v 2
, like archive size and free storage?But ultimately I think you don't need to add email support since piping through mail is sufficient!
Comment on 2017-08-01T14:34:55+0000 by Markus Hubig.
Here are the systemd files I'm using:
borgmatic-check.service
borgmatic-check.timer
Comment on 2017-08-01T14:51:40+0000 by Markus Hubig.
Good idea. I've updated the title of the ticket accordingly. I'm not certain though how possible tweaking the output of "Checking segments", since that comes direct from Borg. Might be able to filter it anyway.
Comment on 2017-08-06T17:05:59+0000 by Dan Helfman.
FYI - The output of "Checking segments" is fixed in borgbackup 1.1.
See github.com/borgbackup/borg/issues/2201 and https://github.com/borgbackup/borg/issues/1590
Comment on 2017-10-14T12:54:51+0000 by Simon Dellenbach.
Now that the Borg "checking segments" issue is fixed, and borgmatic has
--list
and--info
flags to show individual and aggregate archive stats, respectively, I'm calling this ticket done! The one thing not supported is showing free disk space, but you can easily get that withdf
.If there are other features that borgmatic doesn't support yet that would help out in email reports, please file follow-up tickets with details! Thanks.