Time Machine backing up different file systems
Until the release of APFS in High Sierra, there was one native file system used in macOS, Macintosh Extended or HFS+. Time Machine was originally designed to back up HFS+ volumes to backup storage formatted in HFS+. Since then, it has been completely reinvented and rewritten to make best use of the new macOS file system APFS, when making backups of APFS volumes to storage in APFS. But what if you want to mix and match them?
Although the Data volumes containing our Home folders are now required to use APFS, there are many good reasons for wanting other volumes to remain in HFS+. APFS wasn’t designed for hard disks, and can run into severe performance problems when used on traditional rotating storage media. While it might be satisfactory for largely static volumes containing media libraries, the more active they are, the more likely it’s going to suffer fragmentation of the file system metadata, and grind to a halt. So you may well find yourself in the position of wanting to back up a mixture of file systems: APFS for your Data volume and its active Home folders, and HFS+ on external media libraries stored on hard disks. To understand the conflict, I’ll explain how the two Time Machine systems work.
Time Machine on HFS+
When running on macOS Sierra and backing up HFS+ volumes to HFS+ backup storage, Time Machine was relatively simple.
Every hour or so, it started its backing up by examining the database of file system events that had taken place on each volume to be backed up, working out which files had changed since its last backup. It then copied all the files that had changed into the new backup, and created hard links to those that hadn’t changed, including hard links to unchanged directories. Additionally, and not shown here, it maintained its existing backups by thinning them as required.
Apple added a new feature to its HFS+ file system to support Time Machine: directory hard links. Where an entire folder had remained unchanged since the last backup, Time Machine simply created a hard link to the existing folder in that backup. Where an existing file had been changed, though, the new file was written to the backup inside a changed folder, which in turn could contain hard links to unchanged contents.
This preserved the illusion that each backup consisted of the complete contents of the source, but only required the copying of changed files, and creation of a great many hard links to files and folders. It’s also completely dependent on the backup volume using the HFS+ file system, to support those directory hard links.
Time Machine on APFS
Time Machine has become considerably more complex since, to take advantage of the new features of APFS. This is because backups of APFS to APFS use snapshots, both locally on each volume being backed up, and for the backups created on the backup store. It also supports new file types such as sparse files, and instead of copying whole files, it copies only the blocks that have changed, making its backups both quicker and more space-efficient.
Although at first, Time Machine backing up to APFS tried using snapshots to work out what had to be copied to the backup, that scheme is now rarely used, and it still relies primarily on the database of file system events.
As APFS doesn’t support directory hard links, Time Machine now uses a different strategy, of assembling the backed up data into a synthetic snapshot. When viewed in the Finder, each of those backups looks like a real volume, but is read-only, and you can’t change or remove files from it.
Backing up HFS+ to APFS
This poses several problems. As HFS+ doesn’t support snapshots, Time Machine can’t make local snapshots on the HFS+ volumes it’s backing up. Worse, Time Machine can’t fall back to its traditional method, as the APFS storage it’s backing up to doesn’t support directory hard links. It’s unclear what its solution is to those problems, but from reports it doesn’t appear to work at all well, and repeatedly tries to back up much if not all the contents of HFS+ volumes.
There are other conflicts too. Unlike third-party backup utilities such as Carbon Copy Cloner, Time Machine can only run a single backup schedule, although that can support rotating backup storage. It has no option to make backups of some volumes each night or week using one strategy, while backing up other volumes every hour using a different strategy.
Rethinking backups
Time Machine is an excellent and highly efficient means of making frequent backups of active APFS volumes, such as the Data volume with its Home folders. Although its hourly local snapshots and block-level backups often prove ideal for those, they are seldom of much use with media libraries that remain more static. If you need to back up both, then pick the utilities best suited to each task, which might include both Time Machine and a third-party product.
It’s also advantageous to back up your most important files using more than one method, to more than one backup store. Even if you run hourly Time Machine backups, it’s wise to run a nightly backup of the same files using a different method, for example.
You can still use large external hard disks to store backups, perhaps in a RAID enclosure. The Time Machine storage volume will still need to be in case-sensitive APFS; you can then either add more APFS volumes to the same container, so they share free space, or even partition the storage so that your media libraries are backed up to HFS+, if you prefer.
I’m very grateful to Michael for asking about this in the first place.