Time Machine on a Samba or NFS server

Want to back up my MacBook Air to the NAS, which is running NFS and Samba. The existing guides I found weren’t complete. I ham-fisted my way to a solution that seems to be working. This is on High Sierra, the most recent operating system this old laptop will officially run. (Since verified to also work as far back as Lion.)

I skipped using the graphical Disk Utility to setup the sparsebundle, and created it from the command line (in this case, 300GB to back up a 240GB internal SSD):

$ sudo hdiutil create -size 300g -type SPARSEBUNDLE \
-nospotlight -volname "MBA2012TM" -fs "Case-sensitive Journaled HFS+" \
-verbose /Volumes/nas/Time\ Machine/MacBook-Air-2012_TM.sparsebundle

Then I mounted the disk image:

$ open  /Volumes/nas/Time\ Machine/MacBook-Air-2012_TM.sparsebundle

Then I tagged it as a Time Machine eligible drive:

$ sudo tmutil setdestination -a /Volumes/MBA2012TM/ # Under 10.7, omit the '-a'

And then went into the Time Machine control panel and selected the new sparebundle volume as a Time Machine volume, and started the backup from the menu item. (I skipped, for now, attaching the volume at boot-up, and I’m not automatically running Time Machine backups - at least, not right now. I’m still using Nextcloud to automatically sync a working directory across multiple machines, and that gets backed up automatically, so anything really critical is already covered.)

More information:

https://krypted.com/mac-os-x/ins-outs-using-tmutil-backup-restore-review-time-machine-backups/

Comments