I know i can get the time stamp of the latest Time Machine backup with the command tmutil latestbackup | grep -E -o "[0-9\-]+$"
but this only works when my backup disk is plugged in. If not, i get the error message Unable to locate machine directory for host.
Is there any other way to figure out (through scripting) when the last backup was made?
I'm running OS X Mavericks and the use case would be to eventually run this as remote monitoring for Macs, say, using collectd.
defaults read /Library/Preferences/com.apple.TimeMachine.plist Destinations | grep "BACKUP_COMPLETED_DATE"