Time Machine is widely considered one of the best consumer backup solutions ever created, thanks to its “set it and forget it” graphical interface. However, for system administrators managing fleets of Macs, or power users trying to script automated backup routines, the System Settings GUI is incredibly limiting. Fortunately, macOS includes a powerful command-line utility called tmutil, which allows you to control every aspect of Time Machine directly from the Terminal.
Step 1: Check Backup Status
If you are connected via SSH to a remote Mac and want to know if its backups are running properly, you can query the current status.
tmutil status
This will output a block of text. If the Running parameter is 0, no backup is currently in progress. If it is 1, you will see real-time data regarding the percentage completed and bytes copied.
Step 2: Start and Stop Backups Manually
You can force a backup to begin immediately without waiting for the next scheduled hourly interval.
tmutil startbackup
By default, this command returns you to the prompt immediately while the backup runs silently in the background. If you want the terminal to wait and provide progress updates until the backup is finished, append the --block flag:
tmutil startbackup --block
If a backup is running and is consuming too much disk I/O while you are trying to work, you can halt it instantly:
tmutil stopbackup
Step 3: Manage Backup Destinations
In enterprise environments, you often need to point a Mac to a network share (like an SMB server or a NAS) for its Time Machine destination, rather than relying on users plugging in USB hard drives.
To see where the Mac is currently backing up:
tmutil destinationinfo
To set a new network destination (you will be prompted for the SMB password):
sudo tmutil setdestination smb://username@server_address/ShareName
If you have multiple destinations configured and want to remove an old one, grab the ID string from the destinationinfo output and run:
sudo tmutil removedestination [Destination_ID]
Step 4: Exclude Specific Files and Folders
Video editors often have terabytes of scratch files that they do not want clogging up their Time Machine drives. While you can exclude folders via the GUI, tmutil allows you to script these exclusions.
To exclude a specific folder (e.g., the Downloads folder):
sudo tmutil addexclusion -p ~/Downloads
The -p flag ensures the exclusion is absolute and tied to that specific path. If you want to check if a file or folder is currently excluded, you can use the isexcluded command:
tmutil isexcluded ~/Downloads
Step 5: Calculate Space Requirements
If you are about to run a backup and want to know exactly how much data will be transferred (the “delta” between the current state of the Mac and the last backup), tmutil can calculate it without actually initiating the copy process.
tmutil calculatedrift [Backup_Drive_Path]
Alternatively, if you want to know how much space a specific folder on your Mac will take up on the backup drive, use:
tmutil uniquesize ~/Documents
By leveraging tmutil, you can incorporate Time Machine management into bash scripts, Jamf Pro policies, or simple cron jobs, giving you enterprise-level control over Apple’s consumer backup tool.