Make Ubuntu Server 11.10 (Natty) a TimeMachine backup server

Do you want to use TimeMachine from your Mac to backup directly onto a home or office server!!? Do you have Ubuntu 11.10? Are you having issues with Lion and AFP shares? Well this guide is for you! We will get you going the right way!





Download Netatalk 2.2.1
Click Here


## Install Netatalk
$ tar xzf netatalk-2.2.1.tar.gz
$ cd netatalk-2.2.1
$ sudo apt-get build-dep netatalk

$ ./configure --enable-debian
$ make
$ sudo make install

## Install Avahi Daemon
$ sudo apt-get install avahi-daemon

## Configure Netatalk
$ sudo nano /usr/local/etc/netatalk/afpd.conf

## Add this code at the end of file
- -tcp -noddp -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword

## Make Directories for TimeMachine Backups
mkdir /backup
mkdir /backup/timemachine
chown macuser /backup/timemachine
## Setup Netatalk Mac Shares
$ sudo nano /usr/local/etc/netatalk/AppleVolumes.default

## Add this code at the end of file
/backup/timemachine TimeMachine allow:macuser cnidscheme:dbd options:usedots,upriv,tm

## Create new config file
$ sudo nano /etc/avahi/services/afpd.service

## Add this to new file
<?xml version="1.0" standalone='no'?><!--*-nxml-*-->
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<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=MacPro</txt-record>
    </service>
</service-group>
## Start Netatalk and Avahi
$ sudo service netatalk start
$ sudo service avahi-daemon start

## Setup MacOSX Lion to see the shares you just setup

Open Terminal and run this command.

$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1


Open Finder, then from the top bar menu click Go then select Connect to Server or press command-K. Enter the Ubuntu address in the Server Address with the following format:

afp://user@IP-Hostname

Change user to your username that you setup in Ubuntu, and change the IP-Hostname to your Ubuntu IP. If everything ok, you will see the folders under Shared on the left bar.

Now all that is left is to go into TimeMachine and click on Select Disk and choose the disk you have shared from your Ubuntu Server.

If your backup starts copying then everything is ok! Enjoy your TimeMachine Server!

0 comments:

Post a Comment


 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Lady Gaga, Salman Khan