Using Samba share to backup iMac with Time Machine

We have one iMac, which I backup to my Synology with Time Machine. Right now, I’m switching to mini pc with external harddrives and Nextcloud.

To enable backup for the iMac over Time Machine, I had to setup Samba. These are the steps:

Install Samba

sudo apt install samba

Setup a new user to connect to the share, where the backup files should be stored.

sudo useradd -m backupuser
sudo passwd backupuser
sudo smbpasswd -a backupuser

My external drives are mounted to /mnt/data. For this backup case I’ve created the following folder structure: /mnt/data/samba/time-machine/imac

Samba configuration happens in the file /etc/samba/smb.conf

First some basic configuration to enable Samba to handle requests from Apple correct:

[global]
## Configuration for Mac OSX
vfs objects = fruit streams_xattr
fruit:metadata = stream
fruit:model = MacSamba
fruit:veto_appledouble = no
fruit:nfs_aces = no
fruit:wipe_intentionally_left_blank_rfork = yes
fruit:delete_empty_adfiles = yes
fruit:posix_rename = yes
Then I have setup a share for time machine. See the fruit: lines, these are for to make this share Time Machine compatible.
 
[timemachine_imac]
path = /mnt/data/samba/time-machine/imac
read only = no
writeable = yes
valid users = backupuser
fruit:time machine = yes
fruit:time machine max size = 1T
Change the ownership of the folder to the backupuser.
 
chown -R backupuser:backupuser /mnt/data/samba/time-machine/imac
 
And finally restart Samba to apply the configuration changes
 
systemctl restart smbd
 
Try to access the share from your client with the smb protocol. Used url could be smb://yourserver/timemachine_imac. Login with the backupuser.
 
On your Mac, open up the connection in Finder, login. After that, you can add this share as a destination for a Time Machine Backup.
 
 
 
 
 

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre mehr darüber, wie deine Kommentardaten verarbeitet werden.