Sub topic 6
Encrypting your backups
This chapter assumes you can set up Time Machine and attach a backup disk, as covered in the previous chapters. It explains what backup encryption protects, how to turn it on, where the password is kept, and what happens if you lose it.
Why encrypt a backup
A backup holds a full copy of your files, mail, browser data and saved documents. If you encrypt your Mac's startup disk with FileVault but leave the backup disk unencrypted, anyone who gets the backup disk can read all of that data. Backups are also easier to lose than a laptop. They sit in drawers and bags, get sent for repair, and get sold or given away.
Encryption turns the disk's contents into unreadable data unless you supply the password. It protects against someone who has the disk but not the password. It does not protect against malware running on your Mac while the backup is unlocked, and it does not protect against someone who knows your password.
Encryption of the backup is a separate setting from FileVault. Each one covers only its own disk.
| Disk | Protected by | Covered by FileVault? |
|---|---|---|
| Mac's startup disk | FileVault | Yes, if turned on |
| External backup disk | Backup encryption | No, set separately |
| Network backup | Encryption of the disk image on the server | No, set separately |
What encryption does to each destination type
What gets encrypted depends on the destination you chose earlier.
- Local disk formatted as APFS. The backup volume itself is encrypted, using the same volume-level encryption that FileVault uses. The disk shows as locked until it is unlocked with the password.
- Network share (such as a NAS or another Mac). Time Machine stores the backup in a disk image called a sparsebundle on the share. The image is encrypted, so the server holds only unreadable data. The server's own protections still matter for who can reach the share, but they don't let anyone read the backup contents.
- Older Mac-format disks. Disks using the older Mac OS Extended format are encrypted with an earlier mechanism. The steps in System Settings are the same, but new disks should use APFS.
Time Machine decides the format when you add the disk. For a network destination you don't choose it at all. For a local disk, Time Machine can erase the disk and set it up in the right format for you.
Turning on encryption
Encryption is easiest to enable when you first add a disk. Doing it afterwards is harder.
- Connect the backup disk.
- Open System Settings > General > Time Machine.
- Click Add Backup Disk (the plus button) and choose the disk or share.
- In the dialog that follows, select Encrypt Backup.
- Click Set Up Disk.
- Enter a password, enter it again to confirm, and type a password hint.
- Click Done. If macOS says the disk will be erased, check that nothing on it is needed first.
The first backup then starts and is written encrypted from the first byte.
Encrypting a disk that already has backups
Time Machine settings don't offer a switch that encrypts existing backups in place. The dependable method is to add the disk again with Encrypt Backup selected, which starts a new backup history. That has a cost: until the new backup completes, you have no encrypted backup, and the old unencrypted history disappears when the disk is erased. If you want to keep the old history, back up to a second disk first. On a disk already formatted as APFS, macOS can sometimes offer to encrypt the volume directly. If the Finder or Disk Utility shows an encrypt option for the volume, you can try it, but confirm afterward that backups still run.
The password and the keychain
When you set the password, macOS stores it in the Mac's keychain. That is why backups can run every hour without asking you to type anything. It also means:
- Your Mac can unlock the disk by itself after a restart or when you reconnect the disk.
- Another Mac, or the same Mac after a full erase, can't unlock it. The disk asks for the password, which you must supply.
- The password hint is for you. It shows when you are asked for the password. Don't put the password itself in the hint.
This is the most important decision in the chapter. Encryption trades availability for confidentiality. If the Mac fails and the keychain goes with it, the password in your head or password manager is the only way in.
Checking that a disk is encrypted
The Time Machine settings don't clearly mark a destination as encrypted, so check it directly. Run diskutil against the mounted backup volume. Replace Backup Disk with your volume's name.
diskutil info "/Volumes/Backup Disk" | grep -Ei "FileVault|Encrypted"On an encrypted APFS volume, the output includes a line such as FileVault: Yes. If the line says No, the volume is not encrypted. Network destinations don't mount a volume in the same way, so check the sparsebundle's properties in the Finder instead.
You can also list the users who can unlock an APFS volume. Find the volume identifier with diskutil list, then run:
diskutil apfs listCryptoUsers disk4s2Replace disk4s2 with your volume's identifier. A volume with encryption lists at least one cryptographic user, normally a disk password user. A volume without encryption reports none.
Changing the password
You can change the password of an encrypted APFS backup volume with Disk Utility, or from Terminal with diskutil apfs changePassphrase. After you change it, update the stored password. If Time Machine then asks for the new one, enter it so the keychain entry is refreshed. Test it by ejecting the disk, reconnecting it, and starting a backup.
Common problems
- Time Machine keeps asking for the password. The keychain entry may be missing or out of date. Enter the current password when asked, and Time Machine saves it again.
- A restore on a new Mac asks for a password you don't remember. The new Mac has no keychain entry. Look in your password manager before assuming the backup is lost.
- You encrypted the disk, but the hourly backups slow down. The first backup is slow because of the volume of data. Later backups copy only changes, and on current Macs the encryption overhead is small.
- A disk shows as locked in Finder. Click it and enter the password. If it unlocks, the backup data is intact.
Exercise
A colleague turned on FileVault on their MacBook and says their backups are therefore encrypted too. Is that right? What do you check, and with which command?
Show answer
No. FileVault protects only the startup disk. The backup disk is encrypted only if Encrypt Backup was selected when it was added, or if the volume was otherwise encrypted. To check, run diskutil info "/Volumes/<name>" | grep -Ei "FileVault|Encrypted" for the backup volume. A result of FileVault: Yes means it is encrypted. If it says No, add the disk again with Encrypt Backup selected, after copying any history you want to keep to another disk.
Exercise
Your Mac's logic board fails and the Mac is replaced. The backup disk is encrypted, and you saved the password only in the old Mac's keychain. What happens when you try to restore, and how could you have prevented the problem?
Show answer
The new Mac has no keychain entry, so it asks for the password, and without it the backup cannot be read. Nothing can reset it. You could have prevented this by keeping the password in a password manager, or on paper in a safe place, at the time you set up encryption. The password hint helps only if it reminds you of a password you can still produce.