New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include last successful archive in borg info #4047
Comments
One can easily recognize checkpoints by their name, so it seems this is just one filter missing in that plugin. borg info only knows 2 scopes:
So this does not seem in-scope of the current implementation. Some latest archive being not a checkpoint is not necessarily a sufficient condition for a "successful backup", it just means that that backup reached the normal end of execution. But there could be still warnings in the log / borg exiting with rc=1. One also needs to consider the prefix:
You see: last backup was not a checkpoint, but still the system backups somehow never got finished. I'm closing this, it seems like this is rather something for a on-top-of-borg management tool. |
Can anybody at least help me with the
But this doesn't show anything even if there are successful archives. I tried the same re in ipython3 and there it seems to work:
|
IIRC it is just globbing (like on the shell, or with You can not give a |
for the record, I now use this to show the last successful backup timestamp in the repo:
|
@varac guess that works if you have only 1 backup series in the repo. if you do separate backups into 1 repo, you'ld need to check some prefix or so. |
That or even better: borg should show the last successful backup for all backups in the repo, which than can get easily grepped for the specific backup in question. |
I'm not exactly proud of myself here, but this appears to exclude checkpoint archives: borg list --glob-archives "*[!.][!c][!h][!e][!c][!k][!p][!o][!i][!n][!t]" ... |
@witten I don't think that does what you want. For example, it won't list any archive whose name ends in "t". And it won't list any archive whose name is shorter than 11 characters. The earlier |
Right you are. 😄 The reason the This may not sound like a big loss, but I'm trying to provide an "on-top-of-borg management tool" (as @ThomasWaldmann suggests), and so it'd make for an odd user experience to say to users: If you want to filter out checkpoints, then you lose the ability to use other archive filters / JSON at the same time! I know this ticket is already closed, but I think what would be really great is a |
@witten we already have a Could imagine that we add a |
Good idea. Filed #4788. |
I need to integrate a check for successful backups in our monitoring system.
There's nagios-plugin-check_borg but it lists it limitation in the README.md:
I don't know how to exclude checkpoints in borg list in combination with --format='{time}{NUL}'.
If would be nice if
borg info
could contain the details (time, archive name) of the last successful backup (excluding checkpoint archves).The text was updated successfully, but these errors were encountered: