Saturday, 13 February 2010

The Timemachine dilemma

As the first post in this blog, I shall explain the procedure of configuring Mac OS X's Timemachine to backup to a network atached storage, configured either using Samba, CIFS or Apple File Protocol. I have decided to write it here because it took me about 4 hours to manage it, having read many blogs and tutorials just to discover they were explaining things wrong.

First of all, I will consider that your storage is already configured using one of the aforementioned protocols. However, just make sure that you can mount your network share on your mac os system, by

Opening Finder and pressing command+k:



  • The Server address string includes, in correct order, protocol (smb or afp), username (to access the remote share), @server_address (which in my case is almighty) and name of the share (which in my case is rafael).
  • By clicking connect, the network share will be mounted and you will be able to see it in Finder. Try copying an archive to it and them deleting, if everything was ok, move on, else, send me a message.
After mounting the network share, we need to allow Timemachine to be able to see it as a possible backup driver, since Apple took measures to prohibit it by default. Fear not, because freedom is just one command away.


  • Open Terminal.app, write the following and then press enter:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Now open Timemachine preferences panel, and click on  Choose disk. Voilá! Your network mounted share should appear as an option for selecting.

  • If that is not the case, try going to the Terminall.app again and issuing the following command and trying again:
killall "Finder"

Your Timemachine will then select this driver and try to backup to it, however encountering an error, saying the backup image could not be created. Not to worry, we shall solve that from now on.

First, let's make sure that Timemachine has created a certain hidden directory in the network volume.

  • Again to the Terminal.app, and issue:
ls -lah /Volumes/

This command will list every archive and directory in the share, make sure there is one named after the mac address of your mac.

  • To find out which is your mac address, issue:
ifconfig eth0 | grep ether

It is that number shown as six two-digit hex numbers, separated by a colon, for example: 00:17:1b:45:a7:c4. If this was your mac address, then there should be a directory named ".00171b45a7c4" inside the network share.

Since Timemachine could not create the image, we will create one ourselves and manually copy it to the network share.

  • Once again, in the Terminal.app:
hdiutil create -size 200g -fs HFS+J -volname "rafael" _00171b45a7c4.sparsebundle

Notice here that you have to substitute the "200g" for the maximum size you want your backup to occupy, the volume name "rafael" for the name of the volume name you wish to use, the for the obvious replacement (the name of your computer can be found and changed at the sharing preference pannel), and the "00171b45a7c4" for the ethernet address which was used to create that hidden directory that Timemachine created.

Notice: Even if you mean to use your wireless connection for backing up, it is the Mac Address of the wired connection adapter which should be used. This is what took me some hours to find out!

After succesfully creating the sparsebundle image, just copy it over to the network mounted share by dragging it in Finder, and now you may tell Timemachine to start the backup. And you are ready for Apple's Delorean trips to the past!

No comments:

Post a Comment