Building a TimeMachine server with ubuntu 10.10

Requeriments:
Ubuntu Server 10.10 64bit
MacOSX 10.6

On GNU/linux machine as root:
apt-get build-dep netatalk
apt-get install cracklib2-dev fakeroot libssl-dev
apt-get source netatalk
cd netatalk...
DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot -us -uc
cd ..
pkg -i netatalk....deb
echo "netatalk hold" | dpkg --set-selections

Edit file /etc/default/netatalk

ATALKD_RUN=no
PAPD_RUN=no
CNID_METAD_RUN=yes
AFPD_RUN=yes
TIMELORD_RUN=no
A2BOOT_RUN=no

Edit file /etc/netatalk/afpd.conf (add to the bottom)

- -transall -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh

Edit file /etc/netatalk/AppleVolumes.default

/PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv

PATH is the path in linux
NAME is the name of shared folder
USERNAME is the username for this shared folder

Restart service

/etc/init.d/netatalk restart

Try to use the shared resource with Finder with option "Connect to server"

Install avahi for announce the share

apt-get install avahi-daemon
apt-get install libnss-mdns

Edit file /etc/nsswitch.conf

replace line hosts with this:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns

Create file /etc/avahi/services/afpd.service
Fill with this

<?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=Xserve</txt-record>
</service>
</service-group>

Restart avahi:

/etc/init.d/avahi-daemon restart

The share now appears automaticaly in macosx

Now the MacOSX part:

Open console and run this:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

Add the share as your Time Machine, enjoy!

Posted at BinaryCell

Comments

  1. Thanks for this great post!

    I found out that the last line is not necessary if you add 'tm' in the option list of the AppleVolumes.default file.

    So do not apply:

    Open console and run this:

    defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

    but enter this line in the file: AppleVolumes.default file
    /PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv,tm

    Now the share looks like a native time machine device. I used my own login account name as username. It just workd

    ReplyDelete
  2. I could not get the default install available in Ubuntu 10.10 to work. I found this and I'm up and running.

    Minor mistake:
    pkg -i netatalk....deb
    Should be:
    dpkg -i netatalk....deb

    I made some additional changes to /etc/netatalk/AppleVolumes.default

    /PATH NAME allow:USERNAME cnidscheme:dbd options:usedots,upriv,tm volsizelimit:100000

    This marks the share as timemachine compatible (not sure if needed). Also I make the max size 100GB or it would eat up my whole linux disk.

    Thank you!

    ReplyDelete
  3. pkg -i netatalk....deb = dpkg -i netatalk....deb

    ReplyDelete

Post a Comment

Popular Posts