Have a Linux around with some free storage space, and you want to backup your Mac? You can configure your Linux box to just appear in your Mac OSX Time Machine configuration.
I am using Opensuse 12.1 (64bits) here, and the setup is nearly done. Here are just the few extra steps you need to take in order for your Mac to see your storage space and use it as backup. Note that I have done no effort whatsoever to secure the configuration as of now. It functions, but you may want to take it the extra step for added security. This is just a basic setup.
First, let’s tell avahi that you want to advertise a new service. Create a new file, called afpovertcp.service in /etc/avahi/services:
<?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>548</port>
<txt-record>model=PowerMac3,5</txt-record>
</service>
</service-group>
Install the netatalk package, and go configure the afpd.conf file. Go to the end of this file, and uncomment the default line. I had to pass it my actual IP address, because it was not advertising on the right one.
# default:
- -tcp -ipaddr 192.168.1.48 -noddp -uamlist uams_dhx.so,uams_dhx2.so -nosavepassword
The rest of this file is commented on my box.
Then, go edit the AppleVolumes.default file in that same folder. At the end, I simply added the path where I wanted my Time Machine backups to go:
/home/fblaise/mnt/WD15/time_machine "tm_backups" options:tm,ea:auto volcharset:UTF8
At this point, you can start your netatalk service:
service netatalk start
(Edit /etc/init.d/netatalk at l.71. The -n switch takes mandatory parameters apparently, but we’re not using the atalk stuff)
if [ x"${AFPD_RUN}" = x"yes" -a -x /usr/sbin/afpd ] ; then
echo -n " Starting afpd ("
echo -n ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
-c ${AFPD_MAX_CLIENTS}
#-c ${AFPD_MAX_CLIENTS} -n ${ATALK_NAME}${ATALK_ZONE}
echo -n ")"
startproc /usr/sbin/afpd ${AFPD_UAMLIST} -g ${AFPD_GUEST} \
${AFPD_OPTIONS} \
-c ${AFPD_MAX_CLIENTS}
#-c ${AFPD_MAX_CLIENTS} -n "${ATALK_NAME}${ATALK_ZONE}"
rc_status -v
fi
or just start the afpd daemon with no option, just by typing
afpd
as root in a terminal.
You may want to reload the avahi configuration as well with
avahi-daemon -r
Then, go to your Time Machine preferences, and your Linux box should now show up as an option with the path defined above!