Sunday, April 8, 2007

Migrating Gmail account to Google Apps

Step 0: Buy domain (personally I use godaddy)

Step 1: Setup Google Apps, have fun changing MX and CNAME records! (don't worry they have very good instructions and the process only takes an hour or so).

Step 2: Migrate existing Gmail account info to Google Apps account. (here is where the fun starts!)

This is actually something that kind of worried me about using (and eventually getting addicted to ) the cool features of Gmail that aren't 'standard' yet in the rest of the worlds email systems. In short: how do I migrate my mail meta-data (aka labels) ?

There are mechanisms to suck the mail out using gmail's pop interface nicely described here.

So I can get the raw data out but I lose information (which is frankly unacceptable).

Well after several hours of screwing around with various 'hacks' I've discovered this little ruby gem here.

Voila, all my problems are solved....except: I can now download all of my labels and associate them with messages, I can even add new labels to new messages. Unfortunately it only works with Gmail, not with google apps (so I can backup but I can't repopulate!). I tried hacking it a bit but gave up as it occurred to me that this was a one time import, and that it would be more frustrating to get it working than to simply redo my labels by hand. Also any code that I created could be made meaningless tomorrow if google decides to change any of its AJAX calls. (This is why spending any time coding against somebody else's proprietary APIs is evil in my book).

I think most people have given up on google coming up with a nice API to gmail which is a shame. I'm not sure if not coming up with a clean export feature for labels is evil exactly but it sure isn't nice, and if they aren't going to come up with a nice API the least they can do is come up with some crappy CSV label:message-id thing like they did with contacts. I can't imagine that would take more than about 1/2 hour to code and would give people a nice migration path from Gmail to Google Apps.

You know what? Now that I think about it, not exporting label information is evil! I really can't imagine why they aren't doing it. I mean they are already using a crappy csv file for contact info, so I don't think it is that they want to 'hold off and do it right'. This is beginning to have the stench of 'vendor lock-in' to it.

Oh well, can't fight all the worlds battles in one afternoon. It seems that they are at least making something of an attempt at creating an API for google apps. It isn't really that great yet but at least it is a step in the right direction.

Well it seems my google apps mail account has finished sucking all my mail from my gmail account. I've got a busy couple of hours of relabeling to do. :)

No comments: