Bob's Notepad

Notes on projects I have done and things I have learned saved for my reference and for the world to share

Sunday, January 10, 2010

Apple Time Machine backups to Ubuntu network drive

Apple's Time Machine is an awesome utility but gets frustrating when you have to use an external drive. An easier was to do these back ups is using a network drive. Fortunately, the netatalk package installed on an Ubuntu server can provide the functionality you want.

I am using Ubuntu 9.10 on my server. As a note, this is actually a MythBuntu server but functionality should be the same on any other Ubuntu 9.10 server/workstation.

First, as of this writing, the netatalk 2.0.5 packages are not available in karmic's repositories so let's add a debian repository by adding the following to /etc/apt/sources.list:
deb http://ftp.de.debian.org/debian sid main

Now let's install the netatalk package:
sudo apt-get install netatalk

Create a directory for time machine backups:
mkdir /home/user/timemachine

Now we need to edit the /etc/netatalk/AppleVolumes.default file and add the following line:
/home/user/timemachine timemachine options:tm

And restart netatalk:
sudo /etc/init.d/netatalk restart

Now on your mac, open finder, select the Go menu and "Connect to Server". Fill in your server's ip address prefixed by afp:// (for example, afp://192.168.1.100) and you should be prompted for a volume to mount. Select "timemachine", of course. Once that volume is mounted, go to time machine preferences and select that disk and you're all set. If you don't see your network drive as an option then open up terminal and issue the following command:
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

As a note, you may want to now go and remove the extra line from your /etc/apt/sources.list file so that future apt-get commands don't rely on debian's repository and not it's own

Labels: , , , , , , , ,

Reference Link


4 Comments:

Blogger Castles said...

Hi Bob,

I've managed to upgrade to the latest netatalk in karmic server but it won't accept any login credentials from leopard. Do you have any suggestions?

21/2/10 11:12 PM  
Blogger Jason Torgerson said...

Hi Castles - I'm having the same problem. If a resolution is found please let me know.

7/3/10 2:22 PM  
Blogger Aleem said...

The problem is probably libgcrypt not being the latest version. In my case that was it, I looked at the file /var/log/daemon.log and I had:

Mar 14 20:56:14 sidi-desktop afpd[10842]: DHX2 login: aleem
Mar 14 20:56:14 sidi-desktop afpd[10842]: PAM DHX2: libgcrypt versions mismatch. Need: 4594372

So I installed libgcrypt from packages.debian.org. I put the procedure here:

http://sidikahawa.blogspot.com/2010/03/setting-up-time-machine-server-on-my.html

15/3/10 2:45 PM  
Blogger Steve said...

Many thanks for taking the time to post this. It worked perfectly on my 9.04 server.

20/2/11 2:43 PM  

Post a Comment

Links to this post:

Create a Link

<< Home