Apple's new Photos app and Hard Links

FYI, if any of you are using Apple’s new Photos app, be aware that if you have it upgrade from your iPhoto Library that it uses hard links to reference the same files to save space in the newly created Photos Library.

Syncthing, I believe honors hard links as they appear to be just another file to it.

I’m trying to figure out a way to remove the hard links. Any ideas would be appreciated. One thought would be to backup the Photos Library to another drive, thus hopefully the copy will result in “real” files. Then, delete the original, and copy back and resume syncing.

You can probably write a small bash script which creates non-duplicate hardlinks to some external directory.

Wouldn’t Syncthing follow the hard links and sync normal files over to connected devices? I’m not seeing how the duplicate files are appearing.

It would, but I guess he’s worried about it taking up too much space.

Copying back as I’m doing would actually take more space, not less, since the newly create PhotosLibrary would not have hard links.

I have 3 clients currently syncing the same iPhotoLibrary. Once I convert, all these clients will get new PhotosLibrary with hard links to the content of the original iPhotoLibrary.

What happens when we start editing on different machines? Well, maybe nothing since I think Syncthing would still work. Maybe I’m paranoid and a little old fashioned, but I don’t trust links for this amount of data used this way. I just don’t.

In case this helps anyone making the iPhoto to Photos jump…

If you have both your old library and your new one in the same Syncthing folder, then let Syncthing sync up completely first. This is because if you leave the old library in place, Syncthing will be able to copy the new one without having to move much data over the network (it will simply copy existing blocks from the old library to the new). Once Syncthing is completely synced, and you are happy with your new Photos library, you can safely delete your old library. You see, hard links are different than soft links in that if you delete the old reference, the new file simply stops referencing the old data and references itself instead. That’s the thing about hard links: they are not just a pointer, but a file.

The old and the new library don’t need to be in the same Syncthing folder.

Syncthing reuses blocks from all of its known data, no matter in what folder they are.

Ahem… Yes, exactly. :slight_smile: I guess what I really meant was. “If you have both your old library and your new one in Syncthing…” Thanks for the clarification!