Sub topic 5
Back up before you reset anything
This chapter covers the habit that makes every later fix in this tutorial safe: take a backup first. It assumes you can use Finder and System Settings, you know whether your Mac uses Apple silicon or an Intel processor, and you are comfortable typing a few commands in Terminal. By the end you will be able to check that a Time Machine backup exists and is recent. You will also be able to make a quick manual copy of the files an app reset touches, and to restore from either one.
Why backups come before resets
Most steps in this tutorial are low risk. Force quitting an app can lose unsaved work in that app, but it does not touch other files. Resetting preferences, creating test users, running First Aid, and reinstalling macOS are different. They change or remove data, and some of them are hard to undo.
A backup gives you three things:
- A way to undo a reset that turns out to be the wrong move.
- A way to recover when a repair makes things worse. A disk with a damaged file system can get worse during repair, and a failing drive can die while you are working on it.
- A baseline. If the problem disappears after a reset, a copy of the old state lets you compare files and find the cause.
The rule for the rest of the tutorial is: before any step that deletes, moves, or reinstalls something, confirm you have a backup that you could actually restore from.
Two levels of backup
You need two different kinds of backup, and they solve different problems.
| Kind | What it covers | When you make it | Typical tool |
|---|---|---|---|
| Full backup | Your whole user data, apps, and settings | Continuously or on a schedule, before any risky step | Time Machine |
| Targeted copy | One file or folder that a specific step will change | Seconds before that step | Finder or `mv`/`cp` in Terminal |
The full backup protects you from large failures, such as a reinstall or a dead disk. The targeted copy protects you from small mistakes, such as resetting the wrong app. Use both.
Time Machine basics
Time Machine is the backup feature built into macOS. It saves hourly copies of your files to an external drive or a network location, keeps daily copies for the past month, and keeps weekly copies until the drive fills. When the drive is full, it deletes the oldest copies first.
It needs a backup destination. The usual choices are:
- An external USB or Thunderbolt drive.
- A network disk that supports Time Machine, such as a Mac shared over the network or a compatible NAS.
To set it up:
- Connect the drive.
- Open System Settings > General > Time Machine.
- Click Add Backup Disk (the button may read Add or show a plus sign, depending on your macOS version).
- Choose the disk, and decide whether to encrypt the backup. Encryption is a good default for laptops. Store the password somewhere safe, because a backup you cannot unlock is useless.
- Click Done. The first backup can take hours, so start it well before you need it.
Check that the backup is recent and complete
A configured Time Machine does not prove you have a good backup. Check these before a risky step:
- Open System Settings > General > Time Machine.
- Read the Latest Backup line. It should show a time within the last day, or within the last hour if you are about to do something significant.
- If it is old, click Back Up Now (or choose Back Up Now from the Time Machine menu bar item) and wait until it finishes.
You can also check from Terminal:
tmutil latestbackup
tmutil listbackupstmutil latestbackup prints the path of the newest backup. tmutil listbackups lists all backups on the connected destination. If the commands print an error or nothing, no usable backup is currently reachable. The disk may be disconnected, or Terminal may lack Full Disk Access (see the callout below).
What Time Machine does not protect
Time Machine is not a perfect safety net. Know its limits:
- It does not back up an unplugged or full backup disk. If the disk was disconnected for a week, your "latest backup" is a week old.
- It excludes some files by design, such as caches and temporary files. This is fine for most fixes, because those files are rebuilt automatically.
- It is a single copy in one place. If the backup drive sits next to your Mac, a fire, theft, or power surge can destroy both. For important data, add a second copy, such as a cloud service or a second drive kept elsewhere.
- Cloud-only files, for example items in iCloud Drive that are not downloaded, may exist in the cloud rather than on your Mac. Time Machine backs up what is on the Mac's disk. Check that important files are downloaded if you depend on a local backup.
What to back up before each step
Not every step needs a full backup. Match the safeguard to the risk, in line with the "least disruptive first" order from the first chapter.
| Step | Risk to your data | What to do first |
|---|---|---|
| Force quit an app | Unsaved changes in that app are lost | Save other work. A backup does not help with unsaved changes. |
| Reset one app's preferences | You lose that app's settings | Copy that app's preference file (targeted copy). |
| Safe mode | Very low | Nothing special. Note what is running first. |
| Test user account | Low | Nothing special. It is a separate account. |
| First Aid | Low, but a failing disk can get worse | Run a Time Machine backup first. |
| NVRAM or SMC reset | Low for data, but settings like volume and startup disk reset | Note your display, startup disk and time zone settings. |
| macOS Recovery, reinstall | High | Confirm a recent Time Machine backup. |
| Erase the disk | Total loss of local data | Confirm a recent backup, and test that you can read it. |
Targeted copies with Finder and Terminal
When you reset one app's preferences, you do not need to back up the whole Mac. You need a copy of the single file the reset will change. Preference files are stored in your Library folder, in ~/Library/Preferences, and are named after the app's bundle identifier, for example com.apple.dock.plist.
Library is hidden by default. To open it in Finder, hold Option and open the Go menu, then choose Library.
In Terminal, the safest approach is to move the file instead of deleting it. Moving it into a backup folder has the same effect on the app, because the app recreates default settings when it launches and finds no file. Unlike deleting, a move lets you put the file back.
mkdir -p ~/Desktop/prefs-backup
mv ~/Library/Preferences/com.example.App.plist ~/Desktop/prefs-backup/Replace com.example.App with the app's real bundle identifier, and quit the app first. If you do not know the identifier, run this command with the app's name to find it:
osascript -e 'id of app "Safari"'This prints com.apple.Safari. Replace Safari with the name of the app you are troubleshooting.
To undo the reset, quit the app and move the file back:
mv ~/Desktop/prefs-backup/com.example.App.plist ~/Library/Preferences/The full reset procedure is covered in a later chapter. The point here is the habit: copy or move first, then change.
A warning about cached preferences
macOS caches preference data in a background process called cfprefsd. If you edit or move a preference file while the app is running, the cached values can be written back, and your change appears to have no effect. Quit the app before you touch its file. If the old settings return anyway, run killall cfprefsd and relaunch the app. This restarts the cache service, and macOS starts it again automatically.
Restoring from Time Machine
A backup is only worth something if you can restore it. Know the two main restore paths before you need them.
Restore a single file or folder
- Open the folder that held the file in Finder. For a preference file, this is
~/Library/Preferences. - Click the Time Machine icon in the menu bar and choose Browse Time Machine Backups. If the icon is missing, enable it in System Settings.
- Use the timeline or arrows to go back to a date before the problem started.
- Select the file and click Restore.
If a file with the same name already exists, macOS asks whether to keep both, replace, or skip. Keep both if you are unsure.
Restore a whole Mac
If you reinstall macOS or replace the disk, you can restore your data from Time Machine during setup. Setup Assistant offers the choice Transfer Information to This Mac, and you pick the Time Machine backup. You can also use Migration Assistant later. This process comes up again in the macOS Recovery chapter. Read it now so that nothing surprises you later.
A pre-reset checklist
Run through this before any step marked as risky in the following chapters:
- The Time Machine disk is connected and has free space.
- Latest Backup shows a recent time, or you have just run Back Up Now.
- You have saved and closed open documents.
- For a preference reset, the app is quit and its
.plistfile is copied or moved to a backup folder. - You know how to restore: Time Machine for big failures, the saved file for small ones.
Common errors
- Assuming the backup is current. The drive was unplugged, so the last backup is old. Always read the Latest Backup time.
- Never testing a restore. Restore one non-critical file once, so you know the process works.
- Deleting instead of moving.
rmon a preference file gives you no way back. Usemv. - Editing preferences while the app runs. The app or
cfprefsdcan overwrite your change. - Keeping the only backup next to the Mac. A single drive in the same bag as the laptop is one accident away from losing both.
- Forgetting the encryption password. An encrypted backup you cannot unlock is lost data.
Exercise
You plan to reset one app's preferences. Which safeguard fits best, and why would a full Time Machine backup alone be a weaker choice for undoing just that step?
Show answer
Quit the app, then move its .plist file from ~/Library/Preferences to a backup folder with mv, so you can move it back. A Time Machine backup can also restore the file, but it takes more steps and may not hold the exact version from just before your change, because it only runs hourly. The targeted copy is instant and exact.
Exercise
Time Machine shows "Latest Backup: 9 days ago" and you are about to run First Aid on a disk that has been making odd noises. What should you do first, and how can you check the result from Terminal?
Show answer
Connect the backup disk if needed and run Back Up Now, then wait for it to finish. Afterward, run tmutil latestbackup to print the path of the newest backup and confirm it is recent. A failing disk can get worse during repair, so a current backup comes before First Aid.