Short post.
I wanted to repurpose an old external hard drive into a NAS and do time machine backups on it as well.
Here’s the smb.conf
I used – some special stuff needs to be done to make it work with time machine.
Mostly just adding fruit:time machine = yes
and the accompanying parameters.
One important thing to note is that your external hard drive cannot be formatted as any FAT
since it doesn’t support extended attributes which SAMBA needs to make time machine work. I used btrfs.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
usershare allow guests = No
min protocol = SMB2
ea support = yes
vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:nfs_aces = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
[nas]
comment = samba on suse
valid users = ihasdapie
path = /PATH/TO/DRIVE/nas
inherit acls = Yes
read only = No
browsable = yes
writeable = yes
create mask = 0660
directory mask = 0770
browseable = yes
[timemachine]
comment = Time Machine
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 1.0T
path = /PATH/TO/DRIVE/timemachine
browseable = yes
writeable = yes
case sensitive = true
default case = lower
|
Additionally, there are some caveats with the filesystem used on the external hard drive. NTFS and BTRFS and ext4, etc support xattr well, but exFAT doesn’t (or FAT32, etc). So remove streams_xattr
from the samba conf for that share if it is a FAT-formatted drive