Sub topic 5
Back up before you reset anything
This chapter assumes you can use Finder and System Settings, you know whether your Mac uses Apple silicon or Intel, and you are comfortable typing a few commands in Terminal. It covers why a backup comes before any reset, how to make one with Time Machine, how to check that it worked, and how to make a quick copy of a single file before you change it.
Why the backup comes first
The fixes in this tutorial run from gentle (quitting an app) to heavy (reinstalling macOS). Most of them are safe. A few can lose data: resetting preferences, deleting files while testing, or erasing a disk during recovery. A backup turns "I hope this works" into "I can undo this."
Back up before the first step that changes something on disk. Force quitting an app can lose unsaved work in that app, but it does not touch your files. Resetting a preference file, running disk repairs or reinstalling macOS does change what is stored, so those steps need a backup first.
Set up Time Machine
Time Machine is the backup tool built into macOS. It keeps hourly, daily and weekly copies of your files on an external drive or network location, so you can go back to an earlier version.
- Connect an external drive. It should have more free space than the data you want to protect.
- Open System Settings, then General, then Time Machine.
- Click Add Backup Disk (the button may read "Add" or show a plus sign, depending on your macOS version), choose the drive and click Set Up Disk.
- If asked, choose whether to encrypt the backup. Encryption protects your data if the drive is lost, but you must keep the password safe.
- Wait for the first backup to finish. It is the slowest one, and later backups copy only what changed.
Check that the backup is usable
A backup you have not checked is only a guess. After the first backup completes:
- Open the Time Machine settings and read the "Latest Backup" time. It should be from the last few minutes.
- Click the Time Machine icon in the menu bar, if shown, and choose Browse Backups. Look for a recent file, such as a document you edited today.
- Keep the drive connected until the backup finishes. Disconnecting during a backup can leave an incomplete copy.
Time Machine backs up your files, apps and settings, but it does not replace a separate copy of anything irreplaceable. If a file matters a lot, such as a thesis or family photos, keep a second copy elsewhere, for example on another drive or in a cloud service.
Make a quick copy of one file
For a small change, such as resetting one app's preferences, you do not need a full backup of everything. You can copy just the file you are about to change. Time Machine remains your safety net for the rest.
This command creates a backup folder on the Desktop and copies one preference file into it. Replace com.example.App with the app's bundle identifier.
mkdir -p ~/Desktop/prefs-backup
cp ~/Library/Preferences/com.example.App.plist ~/Desktop/prefs-backup/The -p option tells mkdir to create the folder without an error if it already exists. Using cp leaves the original in place. If the reset does not help, copy the file back to its original folder. Quit the app first, because it may rewrite the file while it runs.
Common mistakes
- Backing up to the same disk. A copy on the startup disk disappears with the disk. Use a separate drive.
- Assuming a backup ran. If the drive was unplugged or full, no recent backup exists. Check the "Latest Backup" time.
- Starting a reset while the backup is still running. Wait until it finishes.
- Forgetting the encryption password. An encrypted backup cannot be restored without it.
Exercise
You plan to reset the preferences of one app that keeps crashing. Time Machine last backed up three days ago. What should you do before the reset, and how do you undo the reset if it makes things worse?
Show answer
Run a fresh Time Machine backup (or at least copy that app's .plist file from ~/Library/Preferences to a backup folder) and confirm the "Latest Backup" time is current. To undo the reset, quit the app and copy the saved .plist file back into ~/Library/Preferences, or restore it from Time Machine.