Time Machine

This guide will allow you to use your plug as an Apple Time Machine backup device.

Note that Netatalk will include Lion Time Machine support in the 2.2.x series, coming soon.

Installation and Configuration
First, make sure that you have the netatalk, avahi, and dbus packages installed:
pacman -Sy netatalk avahi dbus

Edit "/etc/hosts.allow" and add this line:
afpd: ALL

Edit "/etc/netatalk/AppleVolumes.default", the bottom entry should look like: (set the correct path for your setup in place of /timemachine)
/timemachine "Time Machine" cnidscheme:cdb options:tm

Make sure /etc/dbus-1/system.d/avahi-dbus.conf looks like this:
<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> <busconfig>   <!-- Only root or user avahi can own the Avahi service --> <policy user="avahi"> <allow own="org.freedesktop.Avahi"/> </policy> <policy user="root"> <allow own="org.freedesktop.Avahi"/> </policy>   <!-- Allow anyone to invoke methods on Avahi server, except SetHostName --> <policy context="default"> <allow send_destination="org.freedesktop.Avahi"/> <allow receive_sender="org.freedesktop.Avahi"/>   <deny send_destination="org.freedesktop.Avahi" send_interface="org.freedesktop.Avahi.Server" send_member="SetHostName"/> </policy>   <!-- Allow everything, including access to SetHostName to users of the group "network" --> <policy group="network"> <allow send_destination="org.freedesktop.Avahi"/> <allow receive_sender="org.freedesktop.Avahi"/> </policy> </busconfig>

Make sure "/etc/avahi/services/afpd.service" looks like this:
<?xml version="1.0" standalone='no'?> <!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>

In "/etc/avahi/avahi-daemon.conf", insert "host-name=AFPVolumeName" - where AFPVolumeName is whatever you want to name the volume. Uncomment "enable-dbus=yes".

Next, create an "/etc/default/avahi-daemon" and insert the line:
AVAHI_DAEMON_START=1

Next, set up the AFP passwords, where "username" is a non-root UNIX user:
touch /etc/netatalk/afppasswd afppasswd -a username

Give the user privileges to the volume with:
chmod 777 /timemachine
Use the path you chose above. Then mount your volume.

To ensure that all the services start at boot, in "/etc/rc.conf", you can add "dbus avahi-daemon afpd" to the list of DAEMONS at the end of the file after "sshd". Reboot to verify that this works.

Set up your Mac
In Finder on your Mac, the volume should show up in the sidebar. The first time you try to access this you may get a connection error but click on "connect as" then enter you username from above.

Full Restores
To do a Full Restore to a new drive (original source), after loading the install disk, the drive has to be mounted before selecting restore from Time Machine. Go to a terminal window and type:
mkdir /Volumes/TimeMachine mount -t afp "afp://<plug_ip>/Time Machine" /Volumes/TimeMachine

Keep in mind that while backing up is pretty effortless, restoring can be tricky, even with a volume directly connected to your Mac. There have been issues with restoring Mail, iTunes, and other applications.

Other Resources
A guide for using a NAS as Time Machine
Another guide