I have been using a USB external hard drive to hold my Time Machine backups. Unfortunately I rarely plug the USB drive into my laptop because I like the freedom of walking around with my Macbook Air. Thus, it became evident that I need a wireless backup solution.
I embarked on a guide to make a time capsule backup system out of my old Ubuntu machine (augmented with another time capsule server on Ubuntu article) I ran into some problems along the way because I want the Time Machine backup to go to a USB hard drive that is connected to my Ubuntu server.
Problem #1: the USB drive went into read-only mode when connected to the Ubuntu machine.
Ubuntu does not support journaled file systems. I found this out by running “dmesg” command on the command line.
prompt% dmesg [ 901.720694] hfs: write access to a journaled filesystem is not supported, use the force option at your own risk, mounting read-only.
Armed with this knowledge, I had to hunt around I to find a solution whereby my Ubuntu machine could write to the Mac-formatted HD. The solution I went with was to turn off Mac Journaled file system on the HD.
Plug the USB HD into your Mac:
- Open Disk Utility under Applications -> Utilities
- Select the volume to disable journaling on.
- Choose Disable Journaling from the File menu. (On later Mac OS versions you’ll have to hold down the option button when you click the File menu. Or if you like Apple+J)
Problem 2: Mac could not connect to Ubuntu
Before embarking on this project I was running samba on the Ubuntu machine for sharing on my home network. Samba is problematic because Mac/Time Machine requires AFP to work. So I decided to turn off Samba and use AFP exclusively for my filesharing. Netatalk is Ubuntu’s AFP service. (sudo apt-get install netatalk, as per the original instructions).
I ran into a problem with netatalk. My Mac OS X 10.7.* machine could not connect to the netatalk AFP service because when it tried to connect I got an “unsupported protocol” error message. It turns out that the authentication method specified in instructions for the /etc/netatalk/afpd.conf file are outdated. An easy fix to get my Mac talking to Ubuntu worked on the first try. Apparently the password authentication scheme changed with Mac 10.7.X
/etc/netatalk/afpd.conf at the end of the file:
- -tcp -noddp -uamlist uams_dhx.so,uams_dhx2.so
- -tcp -noddp -uamlist uams_dhx_passwd.so,uams_dhx2_passwd.so
Then restart the service.
sudo service netatalk restart
Problem 3: Time Machine does not like the drive. (remains unresolved for me)
After some cajoling, I have my Mac talking successfully to my Ubuntu machine fixed HD but not talking to the USB HD connected on the Ubuntu machine. Part of the problem has been that I started out this project running Ubuntu 10.X while the current major release is 12.04. Consequently I am in the process of upgrading 10->11->12.04.
I need to upgrade the Ubuntu installations because Time Machine does not like like the version of Netatalk that I have and I figure updating Ubuntu all the way to the most current version should bring netatalk up-to-speed along with all of the other outdated packages that I have.
I thought I would be following the instructions How to make a Windows Time Capsule, likely with some modifications necessary because I have Ubuntu, not Windows. However, I don’t have a USB router so scratch that.
[Follow UP] I was able to get my homemade Time Capsule working and it was great for the first two weeks. Then I encountered a problem where Time Machine would report that the Backup was corrupted and consequently I would have to back up from scratch. There is a way to fix the error but it never permanently fixes the issue. After a fixing and re-fixing my TM backup over the course of a few months I decided it’s not worth the hassle and am using a wired USB drive for backup. The ReadyNAS is still great for multimedia storage.