mbentley / docker-timemachine

Docker image to run Samba (compatible Time Machine for macOS)
Apache License 2.0
527 stars 65 forks source link

Add the option to control the store dos attributes setting in the global section #154

Closed Alex1s closed 7 months ago

Alex1s commented 7 months ago

If you are not connecting to the Samba server from Windows you do not need to store dos attributes. They are stored in the user.DOSATTRIB extended attribute. This PR adds the ability to control the store dos attributes option in the [global] section using the SMB_STORE_DOS_ATTRIBUTES environment variable. Per default this is set to yes, and thus does not change any current installations.

For more details refer to the documentation here.

Alex1s commented 7 months ago

@mbentley Regarding your excitement of performance improvements: Have you considered to remove the acl_xattr vfs_module? In general I was wondering is there exist a particular reason why/if this module is needed for TimeMachine backups?

mbentley commented 7 months ago

I checked the history with git blame about why that was added - it comes back to https://github.com/mbentley/docker-timemachine/issues/69. Not sure if it is still needed or not - haven't done any testing recently with any of the additional modules. I will say that https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X, which has been a useful reference over the years, does not refer to it.

mbentley commented 7 months ago

Interesting, removing acl_xattr actually resolved a backup issue I was having. Anyway, I am going to merge this because it works fine and doesn't change default behavior.

Alex1s commented 7 months ago

A friend of mine uses a smb.conf without acl_xattr and he never had problems with his backups. I think, at least under normal circumstances, macOS does not use ACLs on any of the files/folders of the backup sparsebundle. At least for me getfacl -sR "Alexis MacBook Pro.sparsebundle" shows nothing.