Is there a command I could run against restic to check when last backup occurred, or number of snapshots since a date.
Just found that because a container was doing my backups where not running since the 13/th August. So something I could run daily to show me number of backups today, or last backup of a tag and send me a warning if there are none today.
You can write a little script that checks the output of the snapshots command in json format
restic snapshots --json --latest 1
Or you can use a wrapper available for restic.
Many of the restic wrappers (like resticprofile ā I made this one) can run commands after a success or a failure, and/or can send requests to third party websites like healthchecks.io so it gives you many possibilities
Other options are to scan the snapshots/ folder in your repository to see when the most recent file was created. Clearly this is depending on date+time being accurate and even if you see a new snapshot file it doesnāt mean that an attacker didnāt just change your backup set to be practically empty. But if you just want to know if restic ran and created a snapshot, it works.
Other than that, donāt you have logs that you can ingest somewhere to keep track of it?
Another way is using a service like https://ifttt.com/ so I recieve a email when a new file is added on the snapshots folder.
Iām just learning, so using Google Drive as repo location.
So, Iām using this āEmail New Google Drive Fileā Email New Google Drive File - IFTTT and I receive an email with the following body (And the subject that I want):