Apr 25, '08 07:30:00AM • Contributed by: kuranuk
Here's a three-step process to create a Time Machine backup on a network-attached storage (NAS) unit.
- Create a sparsebundle image on your local system. I'm not sure of the reason why, but I haven't been able to kick Time Machine off just by specifying a network share. It "prepares" for a while, then says it was unable to create the disk image. The solution appears to be to create a sparsebundle image locally. Thankfully, you don't need multiple Macs like another post suggested; you can accomplish this using hdiutil like so:
Where $SIZESPEC is the size of the backup volume, and $MACHINENAME_$MAC_ADRESS is your Mac's name followed by an underscore and then your Mac's MAC Address (otherwise known as its Ethernet ID; visible in the Network System Preferences panel), but without the colons. So if your Mac is named MyMac, and the Network System Preferences panel lists your Ethernet ID as 00:18:b3:11:84:dd, then you would use MyMac_0018b31184dd for the name of the sparsebundle.
hdiutil create -library SPUD -size $SIZESPEC -fs Journaled HFS+ -type SPARSEBUNDLE -volname $MACHINENAME_$MAC_ADDRESS.sparsebundle
The -size parameter can probably be as large as you want, now that Apple has evidently fixed the sparsebundle issues that were causing all but the most recent backup to be dumped. However, you can also specify a smaller size if you (like me) want to create a hard limit for the amount of space your Time Machine backups will take on your network drive. hdiutil does have a -resize option if you need to utilize that later. - Create and set permissions on your network share. Just make sure you have read/write permissions set on whichever SMB/AFP share you're going to dump this to.
- Copy the sparsebundle to the network share root. Easy enough. Mount your network share and copy it over. I used this Terminal command after the MyBackup share was mounted: cp -r mymachine_0017f2c8426b.sparsebundle /Volumes/MyBackup/.
Personally, I'm using this on a custom Windows Home Server machine via SMB, so not only do I have the ease of Time Machine for my Mac, I have the copies stored on redundant disks using WHS's software-raid-but-not-quite Drive Extender technology (running on a low-power VIA C7, even!).
FURTHER READING:
- Store Time Machine backups on an AFP NAS
- Create a Time Machine size limit for networked disks
- Time Machine Wireless Backup Continued...
- Time Machine backups on network shares 2: possible problems
- Time Machine and AirPort Updates v1.0
- And, just because it's so rare to find a Microsoft product with promise: Windows Home Server
