Samba-based TimeMachine with Big Sur
It’s been driving me nuts that file sharing between my linux server and my Mac has been flaky for quite a while with the mounting sometimes failing and TimeMachine having stopped working ages ago.
Therefore, I finally spent some time to dig deeper and to find a working solution. This has been quite complicated since most information on this online is outdated by now because either AFP is still used or the most recent changes through Big Sur aren’t considered.
Anyways, here’s a setup that works for me™ - may it help someone else who stumbles across this. My setup is the following:
- Client with macOS Big Sur
- Home networking with an internal custom domain
- Server with Ubuntu 20.04.2
- Storage located in a ZFS pool
- Stock Samba 4.11.6
- avahi-daemon 0.7
Samba
The first thing to set up would be Samba. Here, a post in the Apple Developer Forums helped to identify that different plugin configurations need to be made which the otherwise very helpful Samba Wiki didn’t mention.
What worked in the end is the following (incomplete) configuration:
|
|
mDNS
Additionally, mDNS autodiscovery is desired and there have been hiccups in my previous configuration which are most likely related to the discovery mechanism or its configuration. Previously, I had configuration across multiple service files and now consolidated it into one.
Additionally, I’m now providing the fully-qualified domain name of the server in the host-name tag for both the _smb and the _adisk services. However, I’ve tested the configuration with and without that setting and it has been working fine either way.
Finally, my Mac didn’t show an icon in the Finder’s sidebar for XServe or RackMac models anymore. Through the helpful hint here, I found that models are defined in /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist and that MacPro7,1@ECOLOR=226,226,224 represents the rackmount MacPro for which a nice icon is included.
Here’s my complete smb.service that’s stored under /etc/avahi/services/:
|
|