Prerequisites #
- Samba with vfs_fruit module
- Avahi Daemon
Samba config snippet #
#======================= Global Settings =======================
[global]
# Fruit global config
fruit:aapl = yes
fruit:nfs_aces = no
fruit:copyfile = no
fruit:model = MacSamba
# Permissions on new files and directories are inherited from parent directory
inherit permissions = yes
# Delegate "presence registration" to avahi
multicast dns register = no
# Protocol versions
client max protocol = default
client min protocol = SMB2_02
server max protocol = SMB3
server min protocol = SMB2_02
[timemachine]
# Load in modules (mind the order is critical)
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 300G # set to whatever your limit is
comment = Time Machine Backup
path = /mnt/timemachine
available = yes
valid users = timemachine
browseable = yes
guest ok = no
writable = yes
Avahi config #
/etc/avahi/services/samba.service #
<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
<name replace-wildcards="yes">%h</name>
<service>
<type>_smb._tcp</type>
<port>445</port>
</service>
<service>
<type>_device-info._tcp</type>
<port>0</port>
<txt-record>model=TimeCapsule8,119</txt-record>
</service>
<service>
<type>_adisk._tcp</type>
<txt-record>dk0=adVN=timemachine,adVF=0x82</txt-record>
<txt-record>sys=waMa=0,adVF=0x100</txt-record>
</service>
</service-group>
Once you restart avahi daemon samba share will be visible for TimeMachine backup.