brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: tmutil destinationinfo lists every Time Machine backup disk and its ID

Terminal
~/tips/tip-macos-tmutil-destinationinfo

tmutil destinationinfo

Shows which backup disks Time Machine uses and which one got the latest backup.

Over the years a Mac collects backup disks: a USB drive, an old NAS share, a new one. Time Machine settings shows them, but I find the Terminal version clearer, because it also gives you the ID you need for the other tmutil commands.

tmutil destinationinfo prints every destination Time Machine is set up to use:

tmutil destinationinfo

For each one you get the Name as Finder shows it, the Kind (Local for a plugged-in disk, Network for a share), the URL for a network destination, the Mount Point if it’s mounted right now, and the ID. With more than one destination, a > marks the disk that got the most recent backup, which is a nice quick way to see where your backups have really been going. Add -X for the same in XML property list format when a script needs to read it.

The ID is the useful part. It’s what you pass to tmutil startbackup --destination to back up to one disk in particular, and it’s what you need to get rid of a destination that no longer exists, like the share on a NAS you sold:

sudo tmutil removedestination 01234567-89AB-CDEF-0123-456789ABCDEF

Copy the real ID from the output above, of course; mine here is made up.

The caveat: removedestination only removes the disk from the Time Machine configuration. It doesn’t delete the backups that are on it, so the files stay on the disk or share until you clean that up there. It needs root and Full Disk Access, which is why the command has sudo.

Further reading: tmutil man page (SS64 mirror)

More Terminal tips ioreg -rn AppleSmartBattery | grep CycleCount Terminal can save your windows and tabs as a window group Export a Terminal profile to a .terminal file and import it on another Mac mc hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x700000029}]}' All Terminal tips (116) All topics

Link