Twitter Updates

Friday 17 July 2009

Setting up Time Machine on any NAS

Start by opening the Time Machine option pane, "/Applications/System Preferences.app" then choose Time Machine under "Systems"

I would also like to point out something I find very odd which is that Time Machine needs to target a particular partition (Drive letter in windows speak, or volume in mac speak). So for a network drive I would create a new network share called timemachine_computerName

[ADDED 20/07/2009 ]
Most of the following is to setup the new network share so that it will work with time machine. I have program TimeMachineAnyNetworkDrive which will setup most of this for you. then just copy the sparsebundle from your home directory to the networkshare and try time machine again.


First problem is apple does not allow any NAS (Network attached storage) device to be used by default, only their premium priced time capsule!

01NO-NAS

To allow non-apple network drives run this command (from the terminal):
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

02NAS_ALLOWED

Selected NAS but after first attempt the backup fails.
03-NAS-DENIED

What we need to do is create a sparse dmg which gives timemachine all the required file system functions on any filesystem. For this we use the hdiutil command.
NB: The hdiutil command will only work on local (internal and external) drives not network drives.

So we create the sparsebundle (dmg) locally then copy to the remote drive, when copied through the command interface I got a few errors so I copied through finder (graphical interface).

The Sparse bundle name needs to be computerName_MAC.
All the following are typed from the terminal (/Applications/Utilities/Terminal.app) $ inputs > output from the terminal.

To check the computer name you can just run:
$ hostname -s
> Queeg500

The Mac address of the first wired port EN0 is normally used. Every network socket/wifi will have its own MAC. To find your MAC

$ ifconfig en0 | grep ether
> ether 00:1b:63:a6:7e:5b


Sparsebundles takeup only the size of the data they contain, but the size property limits the maximum size. Here we limit to 200Gigabytes.
cd ~
hdiutil create -verbose -size 200g -fs HFS+J -type SPARSEBUNDLE -volname "Backup of Queeg500" Queeg500_001d4ffac84b.sparsebundle
#may be better to move graphically
mv Queeg500_001d4ffac84b.sparsebundle /Volumes/timemachinetest/


Then try the timemachine backup again.
04NAS-WORKING


Very good article here.

No comments: