[Samba] Mac Time Machine backups
torch
casatech19 at gmail.com
Wed Jan 29 21:54:35 UTC 2020
The reddit post may have based its Avahi config on an old Apple document:
https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/Time_Machine_SMB_Spec/ <https://developer.apple.com/library/archive/releasenotes/NetworkingInternetWeb/Time_Machine_SMB_Spec/>
As far as your smb.conf, you should take a look at the docs for the vfs_fruit module : https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html <https://www.samba.org/samba/docs/current/man-html/vfs_fruit.8.html>.
Note that fruit extensions enhance general Mac interoperability with Samba servers, in addition to the Time Machine functionality.
My comments in CAPS below
[global]
# I don't know if these are needed:
obey pam restrictions = yes
## OK FOR MAC/LINUX ONLY CLIENTS
dns proxy = no
## YOU CAN ALSO UNCOMMENT THESE FOR MAC/LINUX ONLY CLIENTS
#disable netbios = yes
#smb ports = 445
## SUGGEST LEAVE NEXT 3 PARAMETERS AT DEFAULT
##unix extensions = no
##wide links = yes
##acl allow execute always = yes
## MACS NEGOTIATE FRUIT EXTENSIONS AT INITIAL CONNECT
## WHICH MAY NOT BE FOR TIME MACHINE
## ADD VFS OBJECTS TO GLOBAL AS WELL AS TM
vfs objects = catia fruit streams_xattr
# 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”.
## VALID MODELS ARE FOUND IN
## /System/Library/CoreServices/CoreTypes.bundle/Contents/Info.plist
## YOU CAN DOUBLE-TAP AND SELECT Quick Look “info.plist”
fruit:model = MacPro
# This isn't mentioned in the docs, hmm:
## INCORRECT PARAMETER - FULLSYNC ENABLE BY FRUIT:TIME MACHINE- SEE VFS_FRUIT DOC
##fruit:advertise_fullsync = true
# My additions:
## AGREE - NEED SMB2+ TO GET FRUIT EXTENSIONS
server min protocol = SMB2
## AGREE - SHOULD SPEED UP COPY
use sendfile = yes
## SUGGEST YOU ALSO INCLUDE THIS
fruit:copyfile = yes
## IF YOU HAVE ONLY MAC/ LINUX CLIENTS YOU CAN UNCOMMENT THESE
## IF GNOME TRACKER RUNS ON YOUR SMB SERVER YOU CAN UNCOMMENT THIS
#spotlight = yes
[TimeMachine]
# 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?
## SUGGEST LEAVE AT DEFAULT
##inherit acls = yes
# Need this!
## AGREE - NOTE THIS ALSO REGISTERS SHARE WITH MDNS/AVAHA/BONJOUR IF SAMBA BUILT WITH MDNS SUPPORT
fruit:time machine = yes
Torch
More information about the samba
mailing list