Skip to content

Instantly share code, notes, and snippets.

@DrTom
Last active December 18, 2022 01:05
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DrTom/7b93f27d75dfb24706c40f748a59c601 to your computer and use it in GitHub Desktop.
Save DrTom/7b93f27d75dfb24706c40f748a59c601 to your computer and use it in GitHub Desktop.
TimeMachine Backups to my Homegrown SBM BTRFs Raid1 Ubuntu NAS

TimeMachine Backups to my Homegrown Samba BTRFs Raid1 Ubuntu NAS

  • works pretty much like the original TimeCapsule
  • perfoms auto backups whenever I am in the lokal network (VPN not tested)
  • no need to mount a SMB share or something (mount point is not shown in Finder)

Samba Config

Needs at recent samba version, i.e. the one on Ubuntu LTS 18.04 would be too old!

/etc/samba/smb.conf:

[timemachine]
        comment = Time Machine
        path = /data/backups/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 = 4 T

Make sure the designated user is allowed to write, create things in the target directory, e.g.:

    drwxrwxr-x 1 root   users  60 Oct 14 12:54 timemachine

Mac Configuration

sudo tmutil setdestination 'smb://<user>:<passoword>@<ip address>:/<backup hard drive name>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment