If I create multiple hard links to the same file on my system, will Time Machine detect it and make only one physical copy of the file?
2 Answers
Little experiment (creating dir, copying file there as a.data
and creating link using ln a.data b.data
) gave me joyless result: Time Machine doesn't care about hard links, in backup there where two separate files with link count of 1. Time Machine cares only about its own file/folder hard links.
-
1OUCH! I literally have 200GB of files hardlinked (for organization purposes) where I can easily have 5-10 copies of the same file, but only 1TB of back up space. So... I literally cannot use Apple's own recommended backup method because I'm using hard links?!– MichaelNov 6, 2014 at 3:27
-
@Michael Unless you can use symlinks instead of hardlinks at least for part of files– tigNov 6, 2014 at 4:23
-
I can't use soft links because of other issues (for instance OS X won't correctly render the icon of a symlink to the item it points to, instead defaulting to a blank "symlink" icon.)– MichaelNov 6, 2014 at 4:31
-
Are you certain about this? I just restored Time Machine files, and my hard links were restored properly. Perhaps this has changed in ten years? yesterday
It will create four copies of those files!
To find and eradicate hard links maybe checkout DupeGuru. It can find dupes, including hard links, then delete, or replace with hard links, or symlinks.