[Samba] Mac Time Machine backups

Phil Endecott spam_from_samba at chezphil.org
Wed Jan 29 15:27:00 UTC 2020

torch wrote:
> Phil,
> A few months ago I bought a QNAP NAS and have had no issues 
> doing TM backups for two Macs over Samba.  QNAP gives a good 
> tutorial  how to do set it up 
> https://www.qnap.com/en-us/how-to/tutorial/article/using-time-machine-to-back-up-your-mac-to-a-qnap-nas-via-smb .

Thanks, unfortunately that doesn't give any clue about the 
underlying samba configuration that results.

> The key was creating the TM folder, mounting it from Finder, 
> then choosing that disk in TM preferences.

I think this may be because they aren't doing mDNS announcements. 
The config that I copied from the Reddit post that I linked to 
before also included some Avahi configuration, and the Time Machine 
Samba share just appears in the Time Machine "select disk..." 
dialog without any need to first mount it (i.e. typing in an 
smb:// in Finder).

(Is it true that Samba does mDNS announcements without the need 
for separate Avahi configuration?)

> I have IPV6 disabled in my local lan so I can’t speak to any 
> potential issues there.

That may have been a red herring.

Anyway here is the config that I'm currently using, which seems 
to work OK; any comments anyone?

# I don't know if these are needed:
obey pam restrictions = yes
dns proxy = no
unix extensions = no
wide links = yes
acl allow execute always = yes

# I don't have any printers:
printcap name = /dev/null
load printers = no

# %m expands to client machine's name:
log file = /var/log/samba/%m.log

# This apparently sets the icon that appears in the Finder on the Mac.
# What are the available models?  Default is apparently "MacSamba".
fruit:model = MacPro

# This isn't mentioned in the docs, hmm:
fruit:advertise_fullsync = true

# My additions:
server min protocol = SMB2
use sendfile = yes

# Hmm, could use the machine name %m rather than the user name %U here.
# (I have one user per client machine, with the same name.)
path = /srv/timemachine/%U

# Note sure about this; it's saying that the only valid username is the 
# username that the client is trying to use.  How is that different from 
# saying all users are valid?
valid users = %U

writable = yes

vfs objects = catia fruit streams_xattr

# Not the default; it is needed?
inherit acls = yes

# Need this!
fruit:time machine = yes

More information about the samba mailing list