This is a custom field which gives the day/time of last full Time Machine backup.
This was originally an extension attribute for another product and I modified it to work as a FileWave custom field.
I'll paste the code here too so you can look without uploading it.
Jean
#!/bin/bash
# Check Time Machine Backups
# Written by Chad Nielsen
# Modified for FileWave by Jean Szinger 6/21/21
###################################[ VARIABLE DEFINITIONS ]##################################
dateBackup="No Time Machine Backups"
macOS=$(sw_vers | awk '/ProductVersion/{print substr($2,1,5)}' | tr -d ".")
pathPlistNew="/Library/Preferences/com.apple.TimeMachine.plist"
pathPlistOld="/private/var/db/.TimeMachine.Results.plist"
######################[ SCRIPT BEGINS - DO NOT MODIFY BELOW THIS LINE ]######################
function main {
# Check the OS to determine where to look.
if [ "$macOS" -ge "109" ]; then
# If Auto Backup is enabled, get the Time Machine last backup date.
checkAutoBackup=$(defaults read "$pathPlistNew" | awk '/AutoBackup/{print $3}' \
| tr -d ";")
if [ "$checkAutoBackup" = "1" ]; then
dateBackup=$(defaults read "$pathPlistNew" Destinations | \
sed -n '/SnapshotDates/,$p' | grep -e '[0-9]' | awk -F '"' '{print $2}' | sort \
| tail -n1 | cut -d" " -f1,2)
if [ "$dateBackup" = "" ]; then
dateBackup="Initial Backup Incomplete"
fi
fi
else
if [ -e "$pathPlistOld" ]; then
dateBackup=$(defaults read "$pathPlistOld" "BACKUP_COMPLETED_DATE")
if [ "$dateBackup" = "" ]; then
dateBackup="Initial Backup Incomplete"
fi
fi
fi
# Report the result to the server.
echo "$dateBackup"
exit 0
}
######################################[ FUNCTION CALLS ]#####################################
main
LastTimeMachineBackup.customfields