I am trying to create a script to determine the destination of time machine on a number of computers I manage. It shows very clearly via Time Machine Settings in System Prefs. I need to be able to find that info via command line.
MacOS – Where does System Preferences store the name of the Time Machine Destination
macossnow leopardsystem-prefstime-machine
Related Question
- MacOS – Mountain Lion, System Preferences and App Store crash, Clean Install doesn’t help
- Where does OS X store mouse preferences
- MacOS – How to enable Time Machine encryption on the command line
- Mac – Time Machine: exclude folders with same name, now AND in the future
- MacOS – How to enable Three Finger Drag from command line
- Mac – Adding a Time Machine destination fails with OSStatus error 17
- Mac – How to use the Time Machine command line interface to backup to an internal ip server
- Mac – Time Machine: error occurred while enabling ownership on the backup disk
Best Answer
The tmutil utility does exactly that, but I think it was only added in Lion.
As an added bonus, Apple doesn't document the tmutil argument you'll need, but I dug through the output of "strings /usr/bin/tmutil" and found this, which is what you're looking for:
Also, "tmutil status" will tell you if a backup is currently running. It's another undocumented command.