Ubuntu 10.10 setting up Mac OS Time Machine server
Posted Under: Backup
Time Machine is a simple backup software in Apple’s Mac OS, “it automatically saves up-to-date copies of everything on Mac such as photos, music, videos, documents, applications, and settings.Time Machine works with an external hard drive or Apple Time Capsule using wireless” (quote from apple.com).
This tutorial is setting up a Time Machine server on Ubuntu 10.10, a redo on this post: sidikahawa.blogspot.com
Step 1: Install Netatalk, an open source implementation of Apple Talk. With Netatalk Linux and BSD can act as AppleShare file server, AppleTalk route, or print server.
use this command:
sudo apt-get install netatalk
Step 2: Configure where to save the Time Machine backups. Here create a target location (/backup/TimeMachine for example).
Edit /etc/netatak/AppleVolumes.default with:
sudo gedit /etc/netatak/AppleVolumes.default
type in following:
#~/ “Home Directory”
/backup/TimeMachine “TimeMachine” options:tm
Here backups will be stored in /backup/TimeMachine. And options:tm means Netatalk will act as AppleTalk
Step 3: Install and Configure Avahi
Avahi is an open source implementation of Apple’s Zeroconf, it makes Mac OS automatically discover the Ubuntu machine in network.
In Ubuntu 10.10, avahi-daemon is installed by default and we just need to configure /etc/avahi/services/afpd.service:
sudo gedit /etc/avahi/services/afpd.service
fill with:
<service-group><name replace-wildcards=”yes”>%h</name><service><type>_afpovertcp._tcp</type><port>548</port></service><service><type>_device-info._tcp</type><port>0</port><txt-record>model=Xserve</txt-record></service></service-group>
Step 4: Now, restart Netatalk and Avahi
sudo service netatalk restart sudo service avahi-daemon restart
Step 5: Configure on Mac OS
Head to Finder -> Go -> Connect to Server -> Browse, and you should find the Ubuntu machine. Log into the Ubuntu, and try if you have write permission to the /backup/TimeMachine folder. If not, go back to Ubuntu machine and add write permission to the folder.
Run the command to enable Time Machine making backups to network drivers.
defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1
Now, select TimeMachine folder on System Preferences -> Time Machine -> Select Backup Disk and finally click to start backup.
Related posts:
- Enable remote desktop in Virtual machine(Virtualbox guest)
- Synchronise different time clock in Windows and Ubuntu dual-boot system
- Make program/application/process Autorun in Scheduled time
- Google Public DNS-Setting up an alternative to current DNS provider in Ubuntu
- Make DSL pppoe Automatically connect to internet after Ubuntu 10.04 Restart


Reader Comments
Hi,
Great review, much clearer than others out there.
However I have followed all of these instructions, no errors, but cannot see the ubuntu machine from os x?
Thanks,
James
[Reply]
james Reply:
February 21st, 2011 at 2:28 pm
I have now managed to connect to my server but only the home directory is found, not the ‘backup/timemachine folder’? Can anyone help? thanks.
[Reply]
Jere Reply:
February 23rd, 2011 at 4:45 pm
I had the same problem and found a solution in another site. Just replace the text in “/etc/avahi/services/afpd.service” with this:
%h
_afpovertcp._tcp
548
_device-info._tcp
0
model=Xserve
[Reply]
Jere Reply:
February 23rd, 2011 at 4:48 pm
ok I don’t know how to post the XML code here but you can find it here: http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/
Thanks for the guide. I am stuck on the MacOS part though. Since I have also configured my Ubuntu-machine as a Samba server, I see all the Samba-shares on MacOSX. I don’t see the AFP-share… Any suggestions?
[Reply]
Vincent Reply:
March 12th, 2011 at 12:29 pm
Hmmm did it by using the XML posted above me.
However: now I can only access the server as an AFP-share and the Samba-shares are unavailable. What is the best way to fix this? Add the other stuff I want to access to the AppleVolumes.default file?
[Reply]
I am facing a serious problem,I have ubuntu10.10 in my laptop “Hasee”but the screen resolution is very bad with gig characters ,It can’t be varied to have normal screen.it is not pleasant!So can any one help me to know what I can do to Get installed a god screen resolution without changing this ubuntu 10.10 version?
[Reply]
In order to work with Lion you need a newer version of appletalk
sudo apt-get install python-software-properties
sudo apt-add-repository ppa:stefanor/ppa
sudo apt-get update
sudo apt-get install netatalk
Then follow the rest of the guide
[Reply]
Has anyone succeeded with mounting the network drive so that it immediately is accessible to the user on the Mac?
When i log in to the server i find myself in the “/home”-folder and not in the “/home/username”-folder. I have to click the username-folder to be able to use the drive as a backup device in Time Machine…..
Is there a way to work around this? I try to implement it at work for some students who run Mac, and I would like it to be as painless as possible for them to use Time Machine.
[Reply]
Thank you for your clean and simple instructions.
Fyi, if anyone is on Ubuntu 11.10 (Oneiric) you may run into an authentication bug with the default netatalk package. I was seeing Sig11′s in my syslog after attempting to authenticate from my mac.
Fix is:
Uncomment the last line in /etc/netatalk/afpd.conf and replace
‘uams_dhx2.so’ with ‘uams_dhx2_passwd.so’ so that it looks like ‘-uamlist uams_dhx.so,uams_dhx2_passwd.so’
Then restart netatalk.
Credited to helpful commenter: andreaswin here:
http://sourceforge.net/tracker/?func=detail&aid=3418627&group_id=8642&atid=108642
[Reply]