Using Time Machine with a normal network share
It's no great secret that OS X supports Apple's shiny (and slightly overpriced, IMHO) Time Capsule straight out of the box as a backup volume for Time Machine, but trying to get it working with a normal network share takes a bit more fiddling, even with Leopard (10.5.6). After finding a few slightly conflicting "how-to"s on various blogs here's what I did to get it working with my D-Link DNS-323 NAS.
- First, configure Time Machine to use "unsupported" network shares by typing the following into a console window:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
- Now, under normal circumstances you'd expect this to just work, as long as you have mounted the network share you wish to use as a backup destination, it should now appear in the "Change Disk..." listing in Time Machine Preferences, but try to run with this and it will sit "Preparing" for a bit then fail with a “The Backup Disk Image could not be mounted.” error message.
- Start Time Machine off again trying to backup but this time watch your network share.
- You will see that a file is created in the following structure:
ComputerName_MACAddress.tmp.sparcebundle, copy this filename. Once the backup attempt fails, this file will disappear so try again if you don't manage to catch it. It appears that Time Machine has a problem creating this file and so the whole thing bombs out. So, let's give it a helping hand and create one for it!
- Open Disk Utility on your Mac. Click “New Image" and use the following settings, in the following order:
- Save as ComputerName_MACAddress (that you copied above, minus the "tmp" part)
- Set whatever you want as the Volume Name.
- Skip over Volume Size for the moment.
- Change Partition to "No Partition Map".
- Change Image Format to “Sparce Bundle Disk Image”.
- Now set the Volume Size, select "Custom Volume Size" and set it to the maximum size you want to use for your backup volume. Don't worry if you don't have the hdd space as this is a maximum size only, it won't immediately create an image file that size. For example I created one set to 900gb which resulted in an image file around 200mb initially.
- Create the image.
- Now copy this image file to your original backup destination network share.
- Start Time Machine off again, and this time it shouldn't fail.
As I type I've now got both my MacBook and Mac Mini backing up to a single network share on my DNS323 "toaster" NAS, I'll report any problems.