.. Original article at http://text.maze.io/2010/02/08/make-ubuntu-a-mac-file-server-and-time-machine-volume _______ ____________ _______ _\__ /_________ ___ _____ | _ _ \ _ | ____\ _ / | |/ _ \ | / / / / | | | /___/ _ | | / / |___/___/ /___/____|________|___ | |_| |___|_____/ \__/ |___| (c) 2010 Wijnand 'maze' Modderman - http://maze.io/ Make Ubuntu a Mac file server and Time Machine volume ===================================================== .. image:: http://i.maze.io/8096217b.png :align: right :alt: Mac Ubuntu file sync The folks at `Kremalicious `_ have written an excellent article about how to setup an AFP-fileserver on your Ubuntu server. If you have your storage attached to an Ubuntu server like me, this is an excellent solution for hassle-free Time Machine backups in OSX. To summarize, building netatalk with SSL support to allow for encryption required by your Mac:: user@pc ~$ mkdir ~/src/netatalk user@pc ~$ cd ~/src/netatalk user@pc netatalk$ sudo apt-get build-dep netatalk ... user@pc netatalk$ sudo apt-get install cracklib2-dev fakeroot libssl-dev ... user@pc netatalk$ apt-get source netatalk user@pc netatalk$ cd netatalk-2* user@pc netatalk-2.0.x$ DEB_BUILD_OPTIONS=ssl dpkg-buildpackage -rfakeroot ... user@pc netatalk$ cd .. ; dpkg -i netatalk_2*.deb ... user@pc netatalk$ echo "netatalk hold" | sudo dpkg --set-selections Configure AFP:: user@pc ~$ sudo vi /etc/default/netatalk ... ATALKD_RUN=no PAPD_RUN=no CNID_METAD_RUN=yes AFPD_RUN=yes TIMELORD_RUN=no A2BOOT_RUN=no user@pc ~$ sudo vi /etc/netatalk/afpd.conf ... - -transall -uamlist uams_randnum.so,uams_dhx.so -nosavepassword -advertise_ssh user@pc ~$ sudo vi /etc/netatalk/AppleVolumes.default ... ~/ "$u" allow:username1,username2 cnidscheme:cdb /home/username/TimeMachine TimeMachine allow:username1,username2 cnidscheme:cdb options:usedots,upriv user@pc ~$ sudo /etc/init.d/netatalk restart Install and configure Avahi (Multicase DNS):: user@pc ~$ sudo apt-get install avahi-daemon ... user@pc ~$ sudo apt-get install libnss-mdns ... user@pc ~$ sudo vi /etc/nsswitch.conf ... hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 mdns ... user@pc ~$ sudo vi /etc/avahi/services/afpd.service %h _afpovertcp._tcp 548 _device-info._tcp 0 model=Xserve $ sudo /etc/init.d/avahi-daemon restart ... Enable networked Time Machine volumes on your Mac:: user@mac ~$ defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1 user@mac ~$ .. image:: http://i.maze.io/159932b7.png :align: right :alt: Time Machine Enjoy your Time Machine Volume! Your server should pop up in Finder as an Apple X-Server and your should be able to access the volumes after successful authentication. If you have any issues, head over the the `Kremalicious `_ article for tips and tricks. Most of the issues you may come across are explained elaborately. I had to use the `Sparse Bundle Hack `_ myself, after creating an empty sparse volume in Disk Utility, Time Machine started synchronising like a charm!