How I fixed my corrupted Entourage Database

Entourage is Microsoft’s version of Outlook for the Mac.

Yesterday, when I came into work, I found that my G5 was locked up. Hmm. The last thing I did Friday was to kick off a Norton Antivirus scan. I don’t normally do this, but I thought that I might, just in the interst of not spreading around virii that might be hiding in my mail file to any PCs, etc.

So, the G5 was locked up. Cycling the power revealed that I had some pretty bad filesystem corruption on both partitions. After some trickery with reformatting my second partition, and using Carbon Copy Cloner to make that parition bootable, I got my root partition properly though fsck_hfs.

So, most of everything seems to be fine except my Entourage database. Running the rebuild tool revealed I/O errors reading the file. So. I performed the requisite Google searches, and came across this.

Once I located the file on the hard disk, I ran it through the usual paces to see what was there… cat, strings, cp, and several others all seemed to give an I/O error after reading about 18 MB of an 837 MB file. However, running tail -100 Database showed me that there was still data accessible at the end of the file. So, the whole thing wasn’t corrupt, just some of it. I just have to be tricksy enough to be able to get at it. To make a long story short, here is what I did:

# dd if=Database of=database.new bs=512 conv=noerror,sync
# mv Database Database.hosed
# mv database.new Database

Start the Entourage Database tool.
Rebuild your database.
Most of your mail is hopefully recovered.

Published in: on February 14, 2006 at 10:00 pm Leave a Comment