Working on OSX, there is no straight forward way to keep a client initiated backup routine, I’m about to launch a periodic bash script via cron. This script has to obtain the last ok Snapshot, and then if it’s older than X hours/days, run another one.
I’m able to list the snapshots but not when were it taken.
Can anyone point me the way of getting the time of the last snapshot?
snapshots --json latest will output a JSON structure representing the last snapshot taken on the current host. You can extract the time with the jq command-line utility, or you could script in an environment that can parse JSON itself.