I’m curious what people are using to monitor their backups? I have Borg running on a cronjob, but checking logs periodically is getting tedious, so I’d like to automate that if possible

  • bjornsno@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    1 year ago

    If you want to do this, what you probably want is to pump your logs into a log drain, something like betterstack is good. They then allow you to set up discrepancy thresholds and can send you emails when something seems to be out of the ordinary. There’s probably a self hosted thing that works the same way but I’ve never found a simple setup. You can do the whole Prometheus, influxdb, grafana setup but imo it’s too much work, and then you still have to set up email smtp separate from that.

  • ShortN0te@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    Use unit files and add on failure a notification per mail or whatever.

    You still should test the backups periodically.

  • lemto@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I just use ’’’borg list [mypath] | tail 1’’’ in my zshrc on my desktop to see the last backup date. I guess you could make it work on server if you mail that output to yourself or something similar. Maybe add it to your cronjob?

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 year ago

    I check the return code from the borg backup job and issue a notification to my phone via NTFY if there was a problem.

    Please note that return code 1 (warning) will be issued if a file changes while borg is backing it up so it’s very common if you backup log files for example. Which is why I only notify for code 2 or greater.

    You can also do it the other way and simply issue a notification no matter what happened, and just list the return code as-is. This is probably better since you also get confirmation that the backup job is actually running.

  • dave@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    I use Borgbase as one of my backup destinations and you can set it to send an email if they haven’t received a new backup for a number of days.

  • Kalcifer@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    Are you looking for something for a headless server or something for a system with a GUI (eg a desktop)?