I just want to get backup last time using command-line.
With this two conditions (that the GUI, the graphical interface upper-right widget we all use normally, normally between the wifi icon and the spotlight-search icon, doesn't seem to need as well):
- No need of any backup (TM) disc plugged.
- No need of the "Full Disk Access" (for the shell) requirement that, for instance,
tmutil listbackups
,tmutil latestbackup
(or all those kind of proposals would need).
(Example when i use: tmutil latestbackup
% tmutil latestbackup
Failed to mount backup destination, error: Error Domain=com.apple.backupd.ErrorDomain Code=18 "Failed to mount destination." UserInfo={NSLocalizedDescription=Failed to mount destination.}
)
I searched the web and i didn't find any definitive answer. Some promising ones, look now to be a bit outdated. This was the most promising (perhaps made sense in ancient system organizations, unfortunately not in my case):
% defaults read /private/var/db/.TimeMachine.Results BACKUP_COMPLETED_DATE
2023-04-08 19:05:57.429 defaults[10864:260510]
The domain/default pair of (/private/var/db/.TimeMachine.Results, BACKUP_COMPLETED_DATE) does not exist
Actually, there is no .TimeMachine.Results
in that folder (ls -a
), at least in my system.
¿As long as the computer without any disc plugged, can grab the value of the last backup and present it in the desktop (upper right TM widget), that value has to be easy available somewhere. Perhaps a plist
file?