Syncthing on OS X - no Extended attributes, etc?

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.

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

No

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

1 Like

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

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

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.

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.

1 Like

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.

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

2 Likes

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

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.

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.

Yeah.

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.

2 Likes

Bump on this topic, it would be great to see extended attributes support for macOS

Please don’t bump dead threads, all that does is annoys people, and will definately have zero impact on whether someone is interested in working on this or not. Best way to get features in syncthing, is to develop it yourself.

2 Likes

This is just a note for anyone who comes along and thinks about implementing this.

You should probably look at how Netatalk (the venerable Apple Fileshare Protocol server for Un*x systems) and Samba (the also venerable SMB server) do this. Because they changed quite recently from .AppleDouble to using extended attributes.

See Netatalk “New AppleDouble backend”.

See also vfs_fruit — Enhanced OS X and Netatalk interoperability.

Of course it’s not necessary for Syncthing to store things in a compatible way with file sharing, but it would be really good if it worked. And no need to re-invent the wheel (and make it square).

Cheers.

Syncing extended attributes between the same OS has been implemented in the meantime: syncXattrs — Syncthing documentation

2 Likes