geerlingguy/arm-nas

Move Time Machine backups to HL15 NAS

geerlingguy opened this issue · 2 comments

Right now I'm sending time machine backups to my ASUSTOR 12-bay NAS, and while that works, it's a bit of a waste of all that NVMe storage, and it also means I have an extra little box running 24x7 to take my Time Machine backups.

I'd like to maybe put one SSD or maybe a mirrored vdev of two SSDs into service as a Time Machine backup volume for my studio Mac. This blog post suggests using netatalk to enable time machine backups, and that seems the simplest way.

Setup of the data pool and netatalk seems like it could be pretty simple:

sudo zpool create backup mirror [device 1] [device 2]
sudo zfs create -p backup/time-machine/mac-studio

sudo useradd --no-create-home --home-dir /backup --shell /usr/sbin/nologin backup_mac_studio
sudo chown backup_mac_studio:backup_mac_studio /backup/time-machine/mac_studio
sudo chmod og-rwx /backup/time-machine/mac_studio

sudo apt update && sudo apt install -y netatalk
sudo tee -a /etc/netatalk/afp.conf << EOF
[tm_mac_studio]
path = /backup/time-machine/mac_studio
time machine = yes
valid users = backup_mac_studio
EOF
sudo service netatalk restart

Something like that—assuming the ZFS volume is mounted at /backup/time-machine in this case.

See also: https://wiki.samba.org/index.php/Configure_Samba_to_Work_Better_with_Mac_OS_X

And issue #9, where I've added in vfs fruit settings for better Final Cut Pro compatibility. It seems like it shouldn't be too hard with Samba (as @onedr0p mentioned above ;).