

Format our drive to HFS+ format: sudo mkfs.hfs /dev/sda1 -v TimeMachine or use Gparted to repartition the drive and label it TimeMachine.For the purposes of this guide, my drive reference will be /dev/sda1 and UUID is 8c9d728a-54f3-4948-81ea-f0482c89fc73.Make note of the drive reference and UUID Plug in your drive into a USB port on the Pi and get the drive UUID with ls -lha /dev/disk/by-uuid.
INSTALL NETATALK RASPBERRY PI INSTALL
Install dependencies: sudo apt install samba avahi-daemon hfsutils hfsprogsĬonnecting and mounting the drive on the Pi.Make sure the Pi uses a static IP on your local network (there are good guides on this, it is out of scope for this post).Ensure your Pi is fully up to date sudo apt-get update & sudo apt-get upgrade -y.

Using the Pi 4B alongside some spare drives can give you a very versatile, cost-effective NAS and server. I’ve now had a few months of reliable, consistent automated Time Machine backups accomplished via my Mac and Rapberry Pi 4B now, attached to a spare 1TB 2.5″ USB 3.0 drive. SMB as the networking protocol I have not been able to get working reliably. Config also now uses HFS+ as the drive filesystem and AFP as the network protocol. Update December 2020: This appears to work on macOS Big Sur, using the latest Raspbian.

Using a Raspberry Pi as a NAS macOS Time Machine (2020 edition)
