Best way to find the date and time of the latest backup in a collection
Aaron via Duplicity-talk <[email protected]>
| Newsgroups | gmane.comp.sysutils.backup.duplicity.general |
|---|---|
| Message-ID | <[email protected]> |
Hello everyone, Sorry I have been so quiet lately. Things have been busy and I have been doing a lot with ZFS rather than Duplicity. I do still use Duplicity for a few things, though. One of those is to do the backups of my Mail-in-a-box installation. I was hoping I could ask what the best way was for me to find the date of the latest duplicity backup to add an alert into prometheus. I have mail-in-a-box backing up to cloud storage using the built-in duplicity backup. I copy that back somewhere and then run a verify, with prometheus monitoring telling me if it has been too long since the verify successfully completed. I noticed today that this has been completing successfully even when the the backups were not copying properly. It seems that this is because the verify completes, it is just verifying a backup that is a month old. I would therefore like to add an additional prometheus check that the last backup is not more than x days old. To do that, I need to extract the date of the latest backup. I could do: duplicity collection-status file:///[location] | grep "Chain end time:" Chain end time: Thu Sep 5 03:09:10 2024 Chain end time: Fri Sep 6 03:09:12 2024 convert those to datetimes and use the latest of them, but is there a better way? I saw there was a new --jsonstat argument, which sounded promising, but does that need to be used as part of the backup process to work correctly? Unfortunately I cannot change the backup arguments because that side is built into mail-in-a-box. Kind regards, Aaron _______________________________________________ Duplicity-talk mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/duplicity-talk