Getting last successful backup time


#1

I’m setting up rest-server as a server for backing up a bunch of clients to.

Since none of the users know how this works, I’d like to keep an eye on their backups from the backend/server side of the fence. For this, I figure that all I really need to know on a daily basis is that clients’ backups run successfully (in terms of there being a backup completed).

For this simple case I think it’s fine to not look into how much data was backed up, and I don’t have multiple hosts per user backing up to their repository, so I don’t care about being able to determine that host X made one of the last Y snapshots. I’m keeping it simple for now.

For this basic use case, shouldn’t it be enough to simply look into each repository, in the snapshots/ directory, and inspect the timestamp of the most recent file created in there? AFAIK a file in there having been created should mean that a backup was “successfully” made (again, disregarding the contents of it, etc).

Or are there better ways to do it, on the server where I just have access to the files but not any of the encryption keys etc (i.e. so all I can do is look at the files on the filesystem)?

Thanks!

For reference, a similar discussion, but from the perspective of the client-side, where the backup takes place, and with multiple hosts per repository as a factor: Monitoring the freshness of backups


#2

For a first check, looking in the snapshots/ dir is sufficient. When a new snapshot was made successfully, as the very last step restic creates a file in snapshots/. For everything else you’d need the repo password.