# Friday, January 23, 2009

Background

When I originally got Mac Mini, Mac OS X 10.5.1 was out. I did a quick google search and found simple steps to follow to get Time Machine to backup to a network volume on my Linux server. Everything worked great!

When Mac OS X 10.5.2 was released a few weeks later, Time Machine would no longer backup to my file server. I did a lot of googling and found I wasn't the only one with the problem, but couldn't find any solutions. I've given it the old collage try a few times since then trying to get it working again, as recently as mid December 2008, but to no avail.

I don't know what possessed me to try and get it working again this time, but I did. And I won! It wasn't an easy battle, nor was it an epic battle. But it was a battle none the less.

Problem

I found the various postings on the net about how to everything working, including Hupio's OSX Timemachine and Samba/Windows share. But nothing really worked. I kept getting the error message "the backup disk image could not be mounted."

I almost gave up again, but decided to google the error message. And came across a few more sites, but they didn't have anything of interest. I don't know why, but I tried to create my sparse bundle on the network share itself, instead of on the Mini and moving it to the network share. That got me the error message "hdiutil: create failed - Operation not supported".

Googling that error message led me to Viraj's post about Time machine + AFP + Ubuntu - Samba. Viraj got everything working by installing the AFP service on his Linux (Ubuntu) server. He linked to How to: Install Netatalk (AFP) on Ubuntu with Encrypted Authentication which was perfect because I happen to be running an Ubuntu server.

Solution

If your using a Linux file server like I am, and want to backup your Mac using Time Machine to your file server, follow these steps:

1. Install AFP on your Linux server

2. Figure out where you are going to store the backups on your file server. I stored mine in /media/backup/TimeMachine. You will need to edit your /etc/netatalk/AppleVolumes.default file and point it to the directory:

sudo echo "/media/backup/TimeMachine \"Time Machines\"" >> /etc/netatalk/AppleVolumes.default

3. Restart netatalk

sudo /etc/init.d/netatalk restart

4. Mount your "Time Machines" volume. Finder -> Go -> Connect to Server and enter afp://IPADDRESS/Time Machines

5. Create a sparse bundle. If your OS volume is case-sensitive like mine, run this in terminal:

hdiutil create -library SPUD -size 50g -fs "Case-sensitive Journaled HFS+" -type SPARSEBUNDLE -volname "TimeMachine for YOURNAME" "YOURMACSNAME_MACADDRESS.sparsebundle"
this will create a 50 GB sparse bundle for Time Machine. If your OS volume is not case-sensitive (the default) use this command:
hdiutil create -library SPUD -size 50g -fs "Journaled HFS+" -type SPARSEBUNDLE -volname "TimeMachine for YOURNAME" "YOURMACSNAME_MACADDRESS.sparsebundle"

I'm not going to go into the details about the command line, the link above goes into greater detail. You will need to read the article so you can plug the correct values in.

6. Move your newly created sparsebundle to your "Time Machines" share:

mv mini_MACADDRESS.sparsebundle /Volumes/Time\ Machines/

7. Configure your Mac to allow backing up to a network share:

defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1

8. Finally, open Time Machine, click "Change Disk" and point to your "Time Machines" volume. In 2 minutes, Time Machine will start to backup your data to your Linux network file system!

A quick note about the conventions used above

all commands blockquote are supposed to be run in Terminal. All commands that start with a sudo (items 2 and 3) are supposed to be run on your Linux server

Friday, January 23, 2009 10:42:58 PM (Alaskan Standard Time, UTC-09:00)

Wednesday, I posted my musing on becoming more grounded as a developer. Yesterday, I tried in ernest to put my reflections into action.

I exercised my code from every angle I could think of, and found a bunch of minor nits. I fixed and refactored the code until I had something I was truly proud of. The problem is, I became so focused on the details that I forgot about a main scenario.

Given the state of my laptop, it would have been a pain, but not painful to test this scenario. All and all, I can say that I'm pleased with my performance yesterday, and will try in earnest to keep this up going forward.

Friday, January 23, 2009 7:32:19 AM (Alaskan Standard Time, UTC-09:00)
# Wednesday, January 21, 2009

I'm trying out blog editing software on my Mac Mini. So far, I've used MarsEdit and Ecto. I'm honestly not very impressed with either of them. MarsEdit doesn't support (that I've found) rich text editing from within its editor. It only supports raw HTML editing, but will shell out to other editors to do the rich text editing.

Ecto, took me quite a few tries to find a good link to download it. When I finally got it downloaded, isn't to terrible. The UI isn't very clean IMHO. Its interface for adding links is sub-par, and NOT discoverable. At least it supports a rich text editor out of the box.

I wish Microsoft would make a version of Windows Live Writer for the Mac :)

Technorati Tags:


Wednesday, January 21, 2009 9:48:12 PM (Alaskan Standard Time, UTC-09:00)