Sub topic 12
Setting up Time Machine
Time Machine is the backup feature built into macOS. It keeps copies of your files on a separate drive, so you can recover a deleted document, an older version of a file, or your whole Mac after a failure. This chapter covers choosing a destination, turning on backups, choosing what to exclude, restoring files, and checking the result from Terminal.
Prerequisites
This chapter assumes you have finished Setup Assistant and signed in with your Apple Account. It also assumes you have installed the current macOS updates, as covered in the previous chapter. You need an external drive, or a network location that supports Time Machine, to follow the setup steps.
What Time Machine does and does not do
Time Machine makes a first full backup, then adds hourly backups of what has changed. It keeps:
- Hourly backups for the past 24 hours.
- Daily backups for the past month.
- Weekly backups for all earlier months, until the disk fills.
When the backup disk is full, Time Machine deletes the oldest backups to make room.
Time Machine is not the same as iCloud. iCloud syncs selected data (such as Photos, Drive and Notes) across your devices. If you delete a synced file on one device, the deletion can sync to the others. Time Machine keeps a separate history on a disk you control. The two work well together. Use iCloud for access everywhere, and Time Machine for recovery.
Choosing a backup destination
Time Machine supports several kinds of destination.
| Destination | Notes |
|---|---|
| External USB or Thunderbolt drive | Simplest option. Fast and reliable. |
| Network location (NAS or another Mac sharing a folder) | Convenient, but slower. The device must support Time Machine over SMB. |
| Multiple destinations | You can add more than one disk. Time Machine alternates between them. |
For the disk, pick a capacity at least two times the amount of data you want to protect. A larger disk holds a longer history.
Disk format
Time Machine formats the backup disk for its own use. On current macOS versions, a disk that Time Machine formats uses APFS. Adding a disk can erase it, so check that it holds nothing you need. If macOS asks whether to erase the disk, read the prompt before you accept.
Encryption
When you choose a disk, you can select Encrypt Backup. Do this for any portable drive. An unencrypted backup disk gives anyone who holds it access to your files, even if FileVault protects the Mac itself. You set a password for the backup disk. Store it in a password manager, because without it you cannot read the backups.
Turning on Time Machine
- Connect the external drive.
- Open System Settings from the Apple menu.
- Choose General in the sidebar, then Time Machine.
- Click Add Backup Disk (or the + button).
- Select your drive and click Set Up Disk.
- Choose Encrypt Backup if you want it, enter and confirm a password, and click Done.
macOS often shows a prompt when you connect a new drive, asking if you want to use it for Time Machine. You can accept that instead of using System Settings. The first backup starts shortly after. It can take hours, depending on how much data you have and how fast the connection is. You can keep working during the backup.
Choosing what to back up
By default Time Machine backs up everything on the Mac, except items macOS knows it can rebuild, such as caches and system temporary files. To exclude more:
- In Time Machine settings, click Options.
- Under Exclude from Backups, click + and choose a folder or disk.
- Click Save.
Large items that you can download again, such as virtual machine images or a games library, are common choices to exclude. Excluding them keeps the disk free for your own files.
The same Options sheet has these settings:
- Back up on battery power applies to laptops. Backups on battery are off by default, which protects battery life.
- Notify after old backups are deleted warns you when the disk is full enough that Time Machine removes history.
Interaction with iCloud
Files that you keep only in iCloud may exist on the Mac as placeholders when Optimize Mac Storage is on. A placeholder is a small stub, and the full file lives in iCloud. Time Machine backs up what is on the Mac, so a placeholder is not a full copy of the file. If you rely on Time Machine to protect iCloud Drive or Photos, turn off optimization for those services, or keep original files downloaded. Otherwise the backup contains stubs, and recovery depends on iCloud still holding the data.
Restoring files
To recover a file or folder:
- Open the folder in Finder where the item used to be.
- Open Time Machine from the menu bar icon (Browse Time Machine Backups), or search for it in Spotlight.
- Use the timeline at the edge of the screen, or the arrows, to go back to a date before the file was lost.
- Select the item and click Restore.
Some apps, such as Photos, have their own restore options inside Time Machine. To restore a whole Mac, or to set up a new Mac from a backup, use Migration Assistant, which was covered earlier in this tutorial. Migration Assistant can read from a Time Machine disk during Setup Assistant or at any later time.
To make the menu bar icon appear, open System Settings, choose Control Center, find Time Machine, and turn on Show in Menu Bar.
Verifying Time Machine from Terminal
The tmutil command controls Time Machine. This command shows the configured destinations, or reports that none is set up:
tmutil destinationinfoThe output lists each destination's name, kind, mount point and ID. If you see "No destinations configured", Time Machine has no backup disk yet.
Other tmutil commands are useful for checks:
tmutil latestbackup
tmutil listbackups
tmutil statustmutil latestbackupprints the path of the most recent backup.tmutil listbackupslists all backups on the destination.tmutil statusshows whether a backup is running and its progress.
On recent macOS versions, tmutil may need Full Disk Access for Terminal to read backup contents. Add Terminal under System Settings > Privacy & Security > Full Disk Access if a command reports a permission error.
You can also start a backup by hand:
tmutil startbackupCommon errors
| Symptom | Likely cause | What to do |
|---|---|---|
| Drive does not appear in the list | Not formatted in a readable way, or a faulty cable or port | Try another cable or port, then check the disk in Disk Utility |
| "The backup disk is not available" | Drive disconnected, asleep, or the network share is offline | Reconnect the drive or check the network |
| First backup takes very long | Large amount of data, slow USB port or Wi-Fi | Use a wired connection and leave the Mac on power |
| Backup disk full warnings | History has outgrown the disk | Exclude large items, or use a larger disk |
| Network backup fails | The NAS does not support Time Machine over SMB, or the credentials are wrong | Check the device documentation and credentials |
Test your backups once after setup by restoring one unimportant file. A backup you have never restored from is only a guess that it works.
Exercise
You have turned on Optimize Mac Storage for iCloud Drive. Why might a Time Machine backup not protect all of your iCloud Drive files, and what can you do about it?
Show answer
With optimization on, some files exist on the Mac only as placeholders, and the full content lives in iCloud. Time Machine backs up only what is stored on the Mac, so those files are not fully backed up. To fix this, turn off Optimize Mac Storage (or download the files you care about) so the full files are on the Mac when Time Machine runs.
Exercise
Which Terminal command tells you whether Time Machine has any backup destination set up, and what does it print when none is configured?
Show answer
tmutil destinationinfo. When no disk is set up, it reports that no destinations are configured.