

The final maintenance phase ensured that hourly backups cover the most recent period. It looked at the FSEvents database on each volume it had to back up, discovered what needed to be copied into the new backup, copied those items across to the backup, and created the hard links required to make that look like a complete duplicate of the original. If your internal storage contained one million files, of which only ten needed to be backed up, TM would have to create 999,990 hard links for that one backup alone.Īt its earliest and simplest, TM’s backup service, backupd, was run every hour as a scheduled task. The number of hard links in each backup would quickly become huge, as every file in that backup would have to be represented either by a hard link or a new backup. Without them, this scheme wouldn’t work: unchanged folders would have to be created in the backup as real folders containing many more hard links to the files within. Apple added them to HFS+ for this purpose. Hard links to files are a common feature of file systems, but hard links to directories (folders) are not normally supported. Hard links are an incredibly efficient way of making each backup look as if it’s a complete copy of the original, when in fact all those files and folders which have remained unchanged since the last backup are represented by hard links back to the previous version. hard links to both files and folders, which are used to minimise the size of TM backups.the FSEvents database, which records changes made to the files and folders on each volume.

Other strategies are adopted by competitors, including most notably Mike Bombich’s Carbon Copy Cloner and David Nanian’s SuperDuper!įor many years, TM relied on two features which were distinctive of macOS:

#Can avast interfere with time machine on mac how to#
This is the first in a series of articles in which I will try to explain much of what I know about Time Machine (TM), starting from its basic principles, how it is implemented in macOS from Sierra (and earlier) to Catalina, and how to troubleshoot and fix its problems.
