Managing Time Machine From the Command Line with tmutil
Starting, stopping, inspecting, and restoring from Time Machine backups without touching the GUI, useful for scripting backups or diagnosing why one is stuck.
Time Machine’s GUI in System Settings covers the common cases well enough, but tmutil — the command-line tool underlying it — gives direct access to functionality the GUI doesn’t expose at all, and is the more practical option for scripting backups or diagnosing a backup that’s behaving unexpectedly.
Checking current backup status
tmutil status
This reports whether a backup is currently running, and if so, its phase (Copying, Preparing, Finding Changes, and others) and progress — considerably more granular and immediately available than the GUI’s summary view, particularly useful when trying to determine whether a backup that seems to be taking an unusually long time is actually still making progress.
Starting and stopping backups manually
tmutil startbackup
tmutil stopbackup
startbackup triggers an immediate backup outside of Time Machine’s normal automatic schedule, useful before a risky system change when you want a fresh restore point without waiting for the next scheduled backup. The --auto flag (tmutil startbackup --auto) triggers a backup only if conditions that would normally trigger one automatically are actually met, useful for scripted/cron-triggered backup attempts that shouldn’t force a backup outside Time Machine’s own normal heuristics.
Listing available backups
tmutil listbackups
This lists every available backup snapshot with its full timestamped path, which is useful both for scripting (referencing a specific backup programmatically) and for confirming exactly how far back your backup history actually extends on a specific destination.
Comparing what changed between two backups
tmutil compare -a
This compares the two most recent backups and reports exactly what files were added, removed, or modified between them — genuinely useful for understanding what a specific backup actually captured, or diagnosing unexpectedly large backup sizes by seeing precisely what changed.
Restoring a specific file without the Time Machine GUI
While the full-screen Time Machine restore interface is the common path for browsing and restoring interactively, tmutil restore handles direct, scriptable single-file or directory restores when you already know exactly what you want restored and from where:
tmutil restore "/Volumes/Time Machine Backups/Backups.backupdb/MacName/2026-07-01-120000/Macintosh HD/Users/name/Documents/file.txt" "/Users/name/Documents/file.txt"
This is considerably more direct than navigating the visual Time Machine restore interface when you already know the specific backup and file path involved, particularly useful in a scripted recovery workflow.
Managing local snapshots directly
Time Machine on APFS-formatted internal storage maintains local snapshots even without an external backup destination attached, and these can be listed and managed directly:
tmutil listlocalsnapshots /
tmutil deletelocalsnapshots <snapshot-date>
Manually deleting local snapshots is occasionally necessary when they’re consuming meaningful disk space and you need to reclaim it immediately, rather than waiting for macOS’s own automatic purging (which normally happens as disk space pressure increases, but isn’t always fast enough for an urgent, immediate space need).
Excluding specific paths from backup via the command line
tmutil addexclusion /path/to/exclude
tmutil isexcluded /path/to/check
addexclusion is functionally equivalent to the GUI’s “Exclude these items” list in Time Machine settings, but scriptable — useful for consistently applying the same exclusion list across multiple Macs via a setup script rather than manually configuring each machine’s exclusions through the GUI individually.
Why the command-line tool matters beyond just convenience
Several of these capabilities — granular phase-level status, direct backup comparison, scriptable exclusion management — simply aren’t exposed anywhere in the GUI at all, making tmutil not just a faster alternative to clicking through System Settings but the only way to access certain Time Machine functionality directly, particularly for anyone managing backup configuration across multiple Macs or needing to diagnose backup behavior more precisely than the GUI’s simplified status view allows.