Time Machine SMB

Iš Žinynas.
Jump to navigation Jump to search

Straipsnis skirtas paruošti Linux mašiną ir įgalinti Samba veikti kaip Apple Time Machine serveris. Reikalinga Samba 4.9 versija.

Įdiegiame samba

apt-get install samba

Atidarome /etc/samba/smb.conf ir sukonfigūruojame taip

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
logging = file
panic action = /usr/share/samba/panic-action %d
server role = standalone server
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
min protocol = SMB2
vfs objects = catia fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:veto_appledouble = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
usershare allow guests = yes

[TimeMachineBackup]
comment = Time Machine
path = /storas/media/TimeMachine
browseable = yes
writeable = yes
create mask = 0600
directory mask = 0700
spotlight = yes
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:time machine = yes
fruit:time machine max size = 1T
guest ok = no
hide unreadable = yes
write list = vartotojas
read list = vartotojas

Patikrinime ar gerai sukonfigūravome:

testparm -v

Perkrauname samba servisus:

/etc/init.d/nmbd restart;/etc/init.d/smbd restart

Jeigu dar neturime vartotojo samba sistemoje, jį nesunkiai galime susikurti

smbpasswd -a vartotojas

Taip pat galime pakeisti fruit:time machine max size = 1T, į pvz.: 2,3 ar 4T jeigu jums reikia daugiau Time Machine paskirtos disko vietos.

Norint rankiniu būdu iš MacOS nustatyti į kur dėti Time Machine atsargines duomenų kopijas, darome taip

sudo tmutil setdestination 'smb://vartotojas:slaptažodis@linux_server_ip/TimeMachineBackup'

Jeigu slaptažodis turi specialių simbolių, skaitykite čia.