Skip to content

Conversation

@missytake
Copy link
Contributor

This enables us to better inspect if the last backup job went wrong, and why.

@missytake
Copy link
Contributor Author

Also, we can now just query for the systemd status in grafana to create alerts:

image

We don't even need an instance-specific alert anymore.

@missytake missytake requested a review from link2xt November 17, 2025 10:31
@missytake
Copy link
Contributor Author

Ugh, borg exits with rc 1 on a warning: https://borgbackup.readthedocs.io/en/stable/usage/general.html#return-codes

do we want to get alerted by a warning already? In this case it was:

Nov 17 12:04:06 b1 backup.sh[2439766]: /home/link2xt/src/chatmail/core/.flake.nix.swp: stat: [Errno 2] No such file or directory: '.flake.nix.swp'
Nov 17 12:28:41 b1 backup.sh[2439766]: /var/log/journal/1ec4b78cfcad4e9395e37efdeee1f9f6/system.journal: file changed while we backed it up
Nov 17 12:29:34 b1 backup.sh[2439766]: /var/log/syslog: file changed while we backed it up
Nov 17 12:33:00 b1 backup.sh[2439766]: /var/lib/prometheus/metrics2/wal/00006937: file changed while we backed it up

@hpk42
Copy link

hpk42 commented Nov 17, 2025 via email

@link2xt
Copy link

link2xt commented Nov 17, 2025

If current alerting based on time since last successful backup works fine, then we can keep it and not worry about warnings.

@missytake
Copy link
Contributor Author

No, warnings should not cause alerts IMO.

yeah, after the alerts of last night I agree.

@missytake missytake requested a review from link2xt November 18, 2025 10:16
@missytake
Copy link
Contributor Author

If current alerting based on time since last successful backup works fine, then we can keep it and not worry about warnings.

It doesn't work atm, and systemd-based alerting is much better in any case, as we don't need to configure an alert for every single host. We literally just need to deploy this with pyinfra on more hosts now, and then we get an alert if a backup failed.

And I wrote a wrapper function in bash to not fail if borg has return code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants