Apple introduced the Apple File System (APFS) at their developers’ conference in 2016. It replaced the aging HFS+ file system which had been used since 1998. It became the default file system for iOS 10.3 in March of 2017. Starting with High Sierra, macOS 10.13, it replaced HFS+ on Macs.
Advantages of APFS
There are a number of features that make APFS a superior file system to its predecessors. Among them are:
- Snapshots — Create point-in-time and read-only instance of the file system.
- Clones — This feature allows efficient file copying that eliminates the need for additional storage space.
- Encryption — Full disk and file encryption are supported in APFS.
- Crash protection — Protects from system crashes by avoiding metadata corruption.
- Increased maximum number of files — You can now have up to 9 quintillion files resident on a volume.
We are going to focus on APFS snapshots and show you how an understanding of them can help you manage your computer.
APFS Snapshots Offer a Way to Go Back in Time
A feature of APFS that is particularly useful is the ability to create point-in-time snapshots of your file system. One of the most beneficial uses of snapshots is to produce backup points that would enable you to restore your machine to the state it was in at the time of the snapshot.
A snapshot can be instrumental in allowing you to recover from a malware attack or inadvertent system corruption. It gives you the ability to travel back in time to a moment when your system was running perfectly.
The purpose of this article is to demonstrate how snapshots are created and used.
macOS Updates and Automatic Snapshots
Apple forces the creation of a snapshot automatically during the system upgrade process. They instituted this procedure starting with upgrades to macOS High Sierra. It enables you to recover from a faulty upgrade or simply return to a previous version of the OS. Your drive needs to be formatted with APFS in order for the snapshot to be created.
When you choose to install a new version of the macOS, the process pauses after you have agreed to the license terms to allow the snapshot to be created. The picture of your system is taken before the new files are copied to your disk.
Apple is not specific about the degree of system update that will trigger an automatic snapshot. You may want to be proactive and create manual snapshots, either before an update or as an extra level of protection for your system. Let’s look at how to create a snapshot on demand.
Creating APFS Snapshots
The method used to manually create an APFS snapshot uses the Time Machine command line utility. It is a simple process. Here are the steps required to create a snapshot on your Mac.
- Start the Terminal application from /Applications/Utilities/ to open a command prompt window.
- Enter the
command to create the snapshot.
- You will get a confirmation message indicating that the snapshot is created at a specific date and time.
You need to ensure that there is enough room on the APFS formatted disk to hold the snapshot. Snapshots are automatically deleted as they age to save storage space. To display the snapshots currently available use this command:
tmutil listlocalsnapshots /
Time Travel with an APFS Snapshot
Using an APFS snapshot to restore your Mac to a previous state requires the use of the Recovery HD and Time Machine. You can use a previously created snapshot using Time Machine even if you don’t use the utility to create regularly scheduled backups on your system.
Here is a step-by-step procedure for using a saved snapshot to recover your machine to a previous state.
- Restart your Mac into recovery mode by holding down the Command and R keys while the system starts up. Hold down the keys until the Apple logo appears.
- In the Recovery Window, select Restore From Time Machine Backup from the list of macOS Utilities.
- Click Continue when the Restore From Time Machine window opens.
- You will be presented with a list of disks. Select the disk that contains the snapshots and click Continue.
- Now select the snapshot you wish to use for the restore. The snapshots will display the data and macOS version that was used to create them.
- A drop-down will ask you to make sure you want to restore using this snapshot. Click Continue when you are certain this is the snapshot you want to use.
- The restore begins and you will see a process bar showing the progress of the restore. When it is complete, your Mac automatically reboots.
That’s the complete process needed to restore your machine back to a previous point-in-time. While it certainly will allow you to recover a damaged system, it does not allow for more fine-tuned data recovery. For that, additional software tools are required.
Disk Drill and APFS Snapshots
Disk Drill data recovery software is a comprehensive application that enables you to recover deleted files from your Mac and peripheral storage devices. The software engineers behind this recovery tool are currently hard at work on developing custom support of APFS backups that would significantly increase their value to the average Mac user.
The next iteration of Disk Drill, which will be Disk Drill 4 for Mac, will introduce a powerful method for using snapshots without requiring the complete rollback of your system. Disk Drill 4 will enable the user to extract individual files from an APFS snapshot rather than having to completely overlay your file system. In this way you can use Disk Drill to recover files from snapshots in much the way that you currently use Time Machine to extract files from backup files.
This additional support for APFS snapshots will make Disk Drill and the snapshots themselves more useful to Mac owners who want to protect their valuable data. Keep your eyes peeled for the next release of this excellent data recovery tool.