I'm pretty sure time machine is using hard links. The gist of that is you save the file in one folder, and then hard-link to it from another folder. The file now appears to exist in both places at once. For all practical purposes, a hard link is functionally identical to the real file. If it's a document and you edit it, the change shows up regardless of how you "get to" the document. Also, if you delete (trash or rm) the document, you remove only ONE of the hard links to the file, so the file remains on the hard drive and completely accessible via any of its other existing hard links. (in reality, whenever you save a document, it gets one hard link to itself, the file you see IS a hard link, it's just the ONLY one for that file, so when that link gets removed, the file gets deleted)

Files can have a (virtually) unlimited number of hard links to them, and the file's disk space is only freed when the hard link count to the file drops to zero.

This allows time machine to have a hundred backups of the same file or folder of files, without taking up much additional disk space. Just more space for more directory entries - the hard links in the directory all point to the same file. (it only makes an actual new copy of an existing file if it has changed) Finder has been "specially educated" about time machine folders, and takes several special steps when doing a drag-and-drop copy. Permissions must be enabled on both ends for example. But it's the best way to copy a time machine backup. If you try to use DITTO from terminal, it won't reconstruct the hard-linking, and you'll quickly run out of disk space on the destination, as each hard link to the same file on the source will produce completely unique files on the destination. (been there, done that, much head-scratching ensued)

One thing I don't know however is whether or not time machine is savvy enough to deal with files and folders that are renamed and/or moved. Theoretically, this doesn't have to interrupt the linking process. In practice however, it greatly complicates making backups, as time machine attempts to identify what was moved or renamed since the last backup, so it can get the linking correct. (two different hard links to the same file can have different file names, in addition to being in different folders - they must however be on the same volume)

The other two types of "file aliases" are symbolic links and Finder Aliases, and all three have very different properties and behaviors.


I work for the Department of Redundancy Department