There are a number of affordable NAS solutions out there that can provide relatively inexpensive network addressable storage over NFS and SMB. Using a Mac with TimeMachine, an NFS server can be configured to provide storage for all of your backups. This article will walk you through setting this up, with the assumption that you already have the NFS storage device available on your network.
The first thing you need to do is enable networked storage volumes for TimeMachine. This can be done at a command prompt with the following:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
The first thing you need to do is enable networked storage volumes for TimeMachineOnce networked devices are enabled, you will need a filesystem on your NFS share that your TimeMachine archive tool can write to. Rather than backup directly to a remote filesystem, a virtual filesystem is used that has been formatted to HFS+ specifications. To create this, enter the following:
hdiutil create -size 128g -type SPARSEBUNDLE -nospotlight -volname "Time Machine Backup" -fs "Case-sensitive Journaled HFS+" -verbose ./mybackup.sparsebundle
The sparsebundle must be created locally on your Mac for the first time, it will not write correctly to a remote filesystem over NFS. After the bundle is ready, from a command prompt open the mybackup.sparsebundle directory and create a file called com.apple.TimeMachine.MachineID.plist. The file should include the following:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.backupd.HostUUID</key> <string>[YOUR_HOST_UUID_VALUE]</string> </dict> </plist>
To find your HostUUID, open System Profiler and on the Hardware Overview screen find the value labeled “Hardware UUID”. remember not to double click on the sparse bundle from the Finder, since this will mount the image and won’t let you create the plist file with your host UUID.
After getting this file into place, open the TimeMachine settings and point it to your NFS share. Before allowing the first backup to start, you may want to unmount the NFS share from your desktop. TimeMachine will take care of auto-mounting when it’s ready to run the backup, and when your computer is out of the office it will gently remind you that the backups have been trying to run without success.