Back up and restore your Mac
It’s important to back up your Mac mini regularly to keep your files safe. You can back up your apps, accounts, settings, music, photos, movies, and documents using Time Machine, which is built into your Mac. Time Machine doesn’t back up the macOS operating system.
Decide where you want to back up your files. Time Machine can back up to an external storage device connected to your Mac mini, as well as other supported storage devices. For a list of devices supported by Time Machine, see the Apple Support article Backup disks you can use with Time Machine.
Set up Time Machine. Before you begin, consult the documentation that came with your storage device, and make sure your Mac mini is on the same Wi-Fi network as your external storage device, or connect the external storage device to your Mac mini with a cable, using an appropriate adapter if necessary (see Use adapters with your Mac mini). Open System Settings, click General > Time Machine, then click Add Backup Disk. Select the drive you want to use for backup, and you’re all set.
Restore your files. You can use Time Machine to restore your files, and choose to restore only some files or all of them at once. Click the Time Machine icon in the menu bar, then choose “Browse Time Machine backups.” Select one or more items that you want to restore (individual folders or your entire disk), then click Restore.
Note: If the Time Machine icon isn’t in the menu bar, choose Apple Menu > System Settings, then click Control Center in the sidebar. Click the pop-up menu next to Time Machine on the right, then choose Show in Menu Bar.
Reinstall macOS. Your operating system files are kept separate from your personal files in a sealed system disk. However, some actions, like erasing or inadvertently damaging a disk, require that you restore your Mac mini. You can reinstall macOS and then use Time Machine to restore your personal files from your backup. With macOS Big Sur and later, there are several ways to restore your Mac. You may be required to install a newer version of macOS than what your computer originally came with, or what you were using before the disk was damaged. To learn more about these options, see Recover all your files from a Time Machine backup in the macOS User Guide and the Apple Support article How to reinstall macOS.
Important: Advanced users may want to create a bootable installer to reinstall macOS in the future. This can be useful if you want to use a specific version of macOS. See the Apple Support article How to create a bootable installer for macOS.
Learn more. See Back up your files with Time Machine and Time Machine troubleshooting on Mac in the macOS User Guide. Also see the Apple Support article What to do before you sell, give away, or trade in your Mac.