Re:Apple File System
by 0942v8653 on Monday June 13, 2016 @04:09PM
(#11897123)
I'm not sure about snapshots, TM is made to work by just copying the directory structure over, and each backup is a fully functioning hierarchy. But cloning is definitely a big deal.
[ Parent
| on HN ]
Re:Apple File System
by lobster_johnson on Monday June 13, 2016 @05:59PM
(#11898072)
Time Machine uses hard links to create a duplicate directory structure without duplicating all the files themselves; only changed files need to be copied.
As I recall, HFS+ was explicitly modified to support directory hard links, which is less common in the Unix world, explicitly to support this feature.
TM also maintains a folder called /.MobileBackups to store temporary backups while your backup drive isn't connected. OS X also maintains /.fseventsd, a log of file system operations that TM can use to perform the next incremental, instead of having to compare each file for modifications.
it doesn't "just" copy the directory structure over each time, it creates the structure for each backup, any files that are changed get copied in, ones that haven't changed are just hardlinked to the existing copies.
A snapshot is a copy of the file (and its blocks) at a given point in time. Subsequent writes to it will happen to new blocks, leaving the ones connected to the snapshot undisturbed.