Backups and redundancy are always important when dealing with data you’re not willing to loose overnight when your hard drives decide it’s time to meet their maker. Usually Seagate or Western Digital in my case, not that I’m complaining *knocks on wood*. Mistakes also happen and you’re bound to eventually delete or somehow damage important data on your hard drive.
Time Machine is a piece of software introduced by Apple when Leopard was launched, it allows us to set up an external or network drive as a backup drive and it backs up data from any given point in time onwards allowing us as well to go “back in time” to any given point in the backups.
Recently I’ve been dabbling a lot with Ubuntu and those of you who know my nerd side know already I’ve googled the hell out of it trying to maximize and/or improve stuff and I’ve come across several interesting articles I’d like to share with whoever reads this. I could just post some links, but that wouldn’t be fun and some of the links might be taken down leaving me without any source of information in case I want to repeat the process.
On with the interesting part, setting up Ubuntu 10.04 as a Time Machine network drive.
Ubuntu is able to speak the Apple language when it comes to networking, all we have to do is install the netatalk package and in case we want to be able to dinamically find the server in our finder window for example, the avahi-daemon package.
$ sudo apt-get install netatalk avahi-daemon
Everything pretty much works right out of the box, we just have to edit a text file describing what directory to use for Time Machine and restart the services.
For this, we will edit /etc/netatak/AppleVolumes.default and add the following:
# By default all users have access to their home directories.
# ~/ “Home Directory”
/TimeMachine “TimeMachine” options:tm
This will point netatalk to a directory called TimeMachine in our root filesystem and share it. It can be a directory inside your home dir. Now we have to actually create the directory and give it the correct permissions.
$ sudo mkdir /TimeMachine
$ sudo chmod a+rw /TimeMachine
Next up, in case we want it showing up on our finder instead of having to connect to it through the “Connect to Server” dialog (afp://192.168.ip.ip), we’ll create a file named /etc/avahi/services/afpd.service and add the following content into it:
<div> <service-group> </div> <div> <name replace-wildcards=”yes”>%h</name> </div> <div> <service> </div> <div> <type>_afpovertcp._tcp</type> </div> <div> <port>548</port> </div> <div> </service> </div> <div> <service> </div> <div> <type>_device-info._tcp</type> </div> <div> <port>0</port> </div> <div> <txt-record>model=Xserve</txt-record> </div> <div> </service> </div> <div> </service-group> </div>
$ sudo service avahi-daemon restart$ sudo service netatalk restart
$ sudo /etc/init.d/avahi-daemon restart$ sudo /etc/init.d/netatalk restart
- Sidi Kawaha
- kremalicious
- The Ubuntu Forums (too many posts to list here)
- If you feel your name should be here please press Contact on the top of this page and use it to email me