Closed tschoesi closed 1 year ago
I had a look at it, and I think the problem is slightly different: A status file is not generated so prometheus only shows the latest one which was successful.
I think we should generate an empty file with a failed status (all the other metrics will be zero)
I am pretty sure that a status file was generated. Almost all metrics were set to 0 except for the duration metrics.
Also the status file timestamp (ls -l
) was updated to the time of the failed backup.
🤔 right I was trying with resticprofile locks but I suppose it should have been a restic lock in that case. I'll try to replicate the problem
I checked again, and I think the problem is something else.
The status file gets created, but all the gauges are set to zero (even when there is no error with locks...)
I have enabled extended-status
default:
repository: "/var/backups/restic"
password-file: "key"
prometheus-save-to-file: "prometheus/backup.prom"
retention:
after-backup: true
prune: true
keep-last: 5
keep-weekly: 4
keep-monthly: 3
backup:
extended-status: true
one-file-system: true
source:
- "/my/path"
Any ideas on what I'm doing wrong?
The problem was that my distros restic version was very old (0.9.4
).
I updated to 0.15.0
and it now works as inteded.
If the backup fails because of a lock that was left over from the process getting killed during a backup, the statusfile (for prometheus) shows a status of
2
forresticprofile_backup_status
.I think it would be clearer if this was set to
0
or at the very least to1