The Cult of Gary

08 Jan

Time Machine, Netatalk and Error Code -6602

Over the Christmas break, I set time machine to backup my laptop to a USB drive attached to my Mythbuntu backend server. There are plenty of instructions out there on how to do this. I used this one.

The machine I’m using as the server is old. It doesn’t have onboard USB 2.0 ports, so the backups were really slow. I grabbed a USB 2.0 card to try and speed up the backups. The long and the short of this is that I managed to hit a 2 year old USB mass storage bug.

In my attempt to get around the bug, I tried upgrading the server from Ubuntu 7.10 to 8.10. The upgrade went well, though it didn’t solve my USB problem.

As a side effect of the upgrade, my laptop wasn’t able to mount the backups any longer. I was getting a -6602 error from Finder. Googling for the error message pointed towards Samba connection problems.

The actual problem turned out to be a change in the Berkeley DB library after the upgrade:

Jan  8 19:23:24 mythtv afpd[28202]: CNID DB initialized using Berkeley DB 4.6.21: (September 27, 2007)
Jan  8 19:23:24 mythtv afpd[28202]: cnid_open: dbenv->open (rw) of /backups/gary/.AppleDB failed: DB_VERSION_MISMATCH: Database environment version mismatch
Jan  8 19:23:24 mythtv afpd[28202]: cnid_open: dbenv->open of /backups/gary/.AppleDB failed: DB_VERSION_MISMATCH: Database environment version mismatch
Jan  8 19:23:24 mythtv afpd[28202]: Cannot open CNID db at [/backups/gary].

The final solution was to remove the old .AppleDB directories and restart netatalk.

Leave a Reply

© 2010 The Cult of Gary | Entries (RSS) and Comments (RSS)

GPSwordpress logo