Time Machine backups using Centos 6.3 written 4 years ago

Time Machine

After flailing about following numerous guides online, here’s what I’ve found to make Time Machine backups to Centos 6.3 work.

Starting from a minimal install:

  1. (Optional) Set a nice hostname, by adding the following to /etc/sysconfig/network-scripts/ifcfg-eth0


    and running

          hostname timemachine
  2. Install the EPEL Repository

        yum -y install wget
        # This might not be the most up to date version of EPEL, so go here:
        # http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html
        wget http://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
        yum localinstall epel-release-6-8.noarch.rpm
  3. Install required packages

        yum -y install dbus nss-mdns avahi netatalk
  4. Set services to start on boot

         chkconfig messagebus on
         chkconfig avahi-daemon on
         chkconfig netatalk on
  5. Configure netatalk, by appending the following to /etc/netatalk/afpd.conf

         - -transall -uamlist uams_randnum.so,uams_dhx.so,uams_dhx2.so -nosavepassword -advertise_ssh
  6. Create a directory to store your backups in, and create the backup user (edit as necessary):

        mkdir /backups
        useradd rob
        passwd rob
        # enter password twice
        chown -R rob:rob /backups
  7. Append the following to /etc/netatalk/AppleVolumes.default (edit as necessary):

         /backups/ TimeMachine allow:rob options:usedots,upriv,tm dperm:0775 fperm:0660 cnidscheme:dbd
  8. Edit the following line in /etc/nsswitch.conf

         #hosts:     db files nisplus nis dns
         hosts:      files mdns4_minimal dns mdns mdns4
  9. Create a new file: /etc/avahi/services/afpd.service

         <?xml version="1.0" standalone='no'?>
         <!DOCTYPE service-group SYSTEM "avahi-service.dtd">
             <name replace-wildcards="yes">%h</name>
  10. Remove un-necessary Avahi service:

        mv /etc/avahi/services/ssh.service /etc/avahi/services/ssh.service.disabled
  11. Poke a hole in the firewall:

        iptables -I INPUT -p udp --dport 548 -j ACCEPT
        iptables -I INPUT -p tcp --dport 548 -j ACCEPT
        iptables -I INPUT -p tcp --dport 5353 -j ACCEPT
        iptables -I INPUT -p udp --dport 5353 -j ACCEPT
        iptables -I INPUT -p udp --dport 5354 -j ACCEPT
        iptables -I INPUT -p tcp --dport 5354 -j ACCEPT

        service iptables save
  12. Start the various services:

         service avahi-daemon start
         service messagebus start
         service netatalk start

You should now be up and running, with a new share visible in the finder and “TimeMachine” displayed when you choose “Add or Remove Backup Disk”. No workarounds should be needed on the Mac.

← previous entry Thu 24th Jan 2013 - 23:21 | 4 comments | tagged with Computery Stuff

 Comments 4 comments made

jnc8651’s Gravatarjnc8651 4 months later

So on step 7 you have a small typo.

You said to edit the file at /etc/atalk/AppleVolumes.default,

It should be /etc/netatalk/AppleVolumes.default

originally posted by jnc8651

So on step 7 you have a small typo.

You said to edit the file at /etc/atalk/AppleVolumes.default,

It should be /etc/netatalk/AppleVolumes.default

Cheers - have updated.

Rafa T’s GravatarRafa T 11 months later

thanks a lot my friend!

BOB’s GravatarBOB 1 year later

Does this work if you boot into rescue mode? For example if I boot pushing command+r do I see this as an option to restore?

Leave a reply

Name: displayed next to your comment
Email: will not be displayed
URL: to link back to your site
Comments: Markdown syntax allowed

Notes on leaving replies: