tmutil is the command-line interface to Time Machine in macOS, the built-in backup system. In the Terminal & scripting toolkit it lets an administrator start and stop backups, configure backup destinations, manage exclusions and inspect or delete local snapshots without opening System Settings.
Because every action is a single shell command, tmutil fits naturally into scripts, launch daemons and MDM workflows. It is the standard way to verify backup health on many Macs at once, to automate backups before risky changes and to recover space taken by APFS local snapshots.
How tmutil drives Time Machine
tmutil does not copy files itself; it sends requests to the backupd daemon, the background process that performs every Time Machine backup. Settings live in the com.apple.TimeMachine preference domain, so tmutil changes the same configuration that the graphical interface shows.
Since macOS Big Sur, Time Machine writes to APFS-formatted destinations and records each backup as an APFS snapshot, which makes incremental runs faster and more reliable than the older HFS+ hard-link design. Network backups are stored inside a sparse bundle disk image on the server, while local snapshots stay on the startup volume.
Most commands that change state require administrator privileges via sudo. Commands that read backup contents also need Full Disk Access granted to Terminal or to the calling agent; without it, tmutil returns permission errors even when run as root.
Core tmutil verbs and what they do
tmutil uses a verb-based syntax in which the first argument names the operation. The table below groups the verbs that administrators use most often.
| Verb | Purpose | Needs sudo |
|---|---|---|
| startbackup | Begins a backup; --block waits until it ends | No |
| stopbackup | Cancels the backup in progress | No |
| enable / disable | Turns automatic backups on or off | Yes |
| setdestination | Sets or adds (-a) a backup disk or share | Yes |
| destinationinfo | Lists configured destinations and their IDs | No |
| addexclusion | Excludes a file, folder or volume | Sometimes |
| listbackups | Lists completed backups on the destination | No |
| status | Reports the phase and progress of a running backup | No |
Two further groups matter in practice. Snapshot verbs such as localsnapshot, listlocalsnapshots and deletelocalsnapshots handle point-in-time copies on the internal disk. Analysis verbs such as compare, uniquesize and calculatedrift show what changed between backups and how much space each one uniquely occupies.
Exclusions and local snapshots
tmutil supports two kinds of exclusion, and confusing them is a common source of surprises. A default addexclusion call writes an extended attribute to the item, so the exclusion follows the file when it moves. The -p option instead records a fixed path in the preferences, which excludes whatever occupies that location later.
| Exclusion type | How it is stored | Behavior when the item moves |
|---|---|---|
| Sticky exclusion | Extended attribute on the item | Remains excluded at the new location |
Fixed-path exclusion (-p) | Path list in preferences | Item is backed up again at the new location |
Volume exclusion (-v) | Volume entry in preferences | Whole volume stays out of backups |
Local snapshots are APFS snapshots that Time Machine keeps on the startup disk, typically for about 24 hours, so recent versions remain available while the backup disk is disconnected. macOS purges them automatically under storage pressure, but tmutil thinlocalsnapshots and deletelocalsnapshots let an administrator reclaim space immediately, for example before a large installer runs.
tmutil compared with related macOS tools
tmutil is one of several single-purpose administration utilities in macOS, and choosing the right one avoids awkward workarounds. The comparison below places it beside neighbors that administrators often combine with it.
| Tool | Main domain | Typical pairing with tmutil |
|---|---|---|
| tmutil | Time Machine backups and snapshots | Primary backup control |
| diskutil | Disks, volumes and APFS containers | Prepares and formats the backup disk |
| defaults | Preference domains | Reads Time Machine settings directly |
| launchctl | launchd jobs and services | Schedules scripts that call tmutil |
| caffeinate | Sleep prevention | Keeps a Mac awake during a long backup |
Unlike general file-copy tools such as rsync, tmutil preserves the versioned history that the Time Machine browser and Migration Assistant understand. A copy made with another tool is not a Time Machine backup and cannot be restored through the standard recovery flow.
Scripting and fleet use
In managed environments tmutil is most valuable as a monitoring and remediation tool. MDM extension attributes and compliance scripts typically call tmutil latestbackup or tmutil destinationinfo and flag any Mac whose last successful backup is older than a set threshold.
| Situation | tmutil approach | Reason |
|---|---|---|
| Before a major upgrade | startbackup --auto --block | Guarantees a fresh restore point |
| Compliance reporting | latestbackup plus date parsing | Detects Macs that stopped backing up |
| Low disk space alerts | thinlocalsnapshots / with a size | Frees space without disabling backups |
| New network share | setdestination -p with a URL | Prompts for credentials securely |
Scripts should check exit codes and treat empty output carefully, because several verbs print nothing when no destination is reachable. Embedding a password directly in setdestination is a serious credential risk; the -p prompt or a managed configuration profile is the safer choice.
Limitations and common mistakes
tmutil is powerful but has sharp edges, especially on recent macOS releases where privacy controls tightened. The most frequent problems are listed below.
- Missing Full Disk Access causes
listbackupsorcompareto fail with misleading permission errors. - Deleting backups with Finder instead of
tmutil deletecan damage the backup set; use the tool or the Time Machine interface. - Assuming local snapshots are backups: they live on the same disk and disappear if that disk fails.
- Relying on removed verbs: some options from the HFS+ era behave differently or are unsupported on APFS destinations.
- Running startbackup without –block in a script, which lets the script continue before the backup has finished.
Finally, tmutil only reports what backupd knows. A destination that mounts but contains a corrupted sparse bundle can still appear healthy, so periodic test restores remain the only real proof that backups work.
A non-technical view
Time Machine is the backup feature that comes with every Mac. Normally you control it with buttons in System Settings. tmutil is the typed version of those buttons. You write a short command in Terminal, and the Mac starts a backup, changes the backup disk or skips a folder.
Think of it like a remote control for a recorder. The recorder does the work. The remote just tells it what to do. This matters most for people who look after many Macs, because one command can check or fix backups on every computer at once.
A concrete example
An IT team at a design studio manages 60 Macs that back up to a network share. Their MDM runs a nightly script that calls tmutil latestbackup, extracts the date and marks any Mac whose newest backup is more than seven days old as noncompliant.
One week the report flags eight laptops. The administrator runs tmutil destinationinfo remotely and finds that the share address changed after a server move. A second script calls sudo tmutil setdestination -p with the new address on those machines, then tmutil startbackup --auto --block. By the next morning all eight Macs report fresh backups, and no user had to open System Settings.