Syncthing on OS X - no Extended attributes, etc?


(Orlin M Bozhinov) #21

Recently found this article which gave me some hope my wish has a chance. Samba and rsync are ok, but I rather use syncthing. Syncany doesn’t backup xattrs yet.


(Paul Gessinger) #22

Just curious if there was any news concerning this in the last ~2 years. Did anyone think about doing this since?


(Audrius Butkevicius) #23

No


(ncantor) #24

Extended attributes (xattrs) on all platforms are data. Infrequently used but still data.

Preserving them is difficult, complex and corner case prone but not preserving them is directly contradictory to stated primary goal of Syncthing. This has come up a number of times on the forums and I propose that it warrants a stronger warning than just the sole mention in the docs. https://docs.syncthing.net/users/faq.html

Syncthing should be:

  1. Safe From Data Loss

Protecting the user’s data is paramount. We take every reasonable precaution to avoid corrupting the user’s files.

This is the overriding goal, without which synchronizing files becomes pointless. This means that we do not make unsafe trade offs for the sake of performance or, in some cases, even usability.

From https://github.com/syncthing/syncthing/blob/master/GOALS.md


(Audrius Butkevicius) #25

I am sorry syncthing is causing data loss for your usecase, but there is no current plans to rectify this.


(Kluppy) #26

No. By definition extended attributes are metadata. This cannot easily be transferred between systems without risking data loss.


(Jakob Borg) #27

There are corner cases. For example, icon files traditionally hold all the icon data in the resource fork on Macs, because the icon is a “resource”. Syncthing will happily sync this as a zero byte file to everywhere else, including other Macs.

My personal opinion is that today it would be an extremely unwise choice to store critical data as alternate data streams, in resource forks, etc.

Nonetheless these things exist and it would be neat to preserve them. Pull requests welcome, as noted multiple times above.


(ncantor) #28

Agreed. xattrs are an error prone, poorly engineered way of storing data. It is unfortunate that they are being used at all. Syncthing’s handling of xattrs is not a game changer for me but it does stop me from using some features of my OS since I know the changes will not be synced. I fear that Apple will keep adding more and more data to the xattrs in the future which will break all sorts of applications.

Syncthing has been a genuine blessing to my workflow. Thanks for the fantastic software.


(Bunam) #29

Extended Attributes, Resource Forks (not preserved) so sad !!! If Mac users didn’t choose your solution, it’s probably for that ;p ? Did you know what Windows® have a similar feature (it was for being compatible with apple share) = NTFS Alternate Data Streams. Some peoples use it as a useful place : https://www.howtogeek.com/howto/windows-vista/stupid-geek-tricks-hide-data-in-a-secret-text-file-compartment/

I’m using syncthing on 2 Macs and i’m stressed now because Resource Forks are not preserved.


(xor-gate) #30

Resource forks are not only a problem with syncthing. Also with SMB, NFS, AFP protocols. However, as forks can make it difficult to exchange files with other operating systems, this feature is not in common use. Even in OS X, resource forks are seldom used anymore. Source https://en.wikipedia.org/wiki/Resource_fork#Compatibility_problems


(Ben Byram Wigfield) #31

I made the original query in this thread. I now use Resilio Sync, which handles extended attributes very well. (Some configuration required.)


(Jakob Borg) #32

I think the cleanest implementation would be to add a string field alternate_stream to the FileInfo structure. The various alternate streams and attributes and stuff then become separate “files”. The actual puller would have to decide whether to treat changes as metadata changes (applied to the existing file) or content changes (file is copied with change data changed), depending on the specifics.


(Audrius Butkevicius) #33

What if the data in the stream changes, etc, etc. Also, not obvious if changing streams or what not changes mtime, etc.

This definately needs more thought.


(Jakob Borg) #34

Yeah.


#35

Hello:

Just a point of feedback into the project: I look after a company’s IT, for which Syncthing is an ideal fit. We’ve installed a trial setup for them, and they’ve been using it for nearly six months.

Unfortunately they’ve requested to move over to another solution - probably Dropbox in their case - because Syncthing does not sync Mac OS X Extended Attributes. In their case, they heavily use tags/labels to manage the state of projects - and as these don’t get synced, they feel they’re not able to continue with Syncthing.

I know I know that you’d welcome a well-written pull-request for this; unfortunately I don’t (yet) have the time or skills to put something together myself. It’s on my radar to do so - but I can’t see myself getting to it in a useful way in the near future.

Just thought you should know!

Thanks,

Pants.