Friday, January 30, 2009

Google Gears with GMail, Google Reader, and Google Docs

I would like to convert my workflow to use Gears enabled local persistence for GMail, Reader, and Docs. I used to use GMail POP3 support and GData web service APIs to backup my GMail and Docs locally. I still need to write some short Ruby scripts to access (as a test) the local sqlite databases used by Gears for GMail and Docs - just to make sure that I can use the local copies of my data. When I am sure that everything is accessible then I will stop doing my POP3 and GData based backups and just back up the sqlite databases that Gears creates and maintains.

To access the sqlite databases, you need to do a little searching: on my system these files are on
/Users/markw/Library/Caches/Firefox/Profiles/btzzru2q.default/Google Gears for Firefox
Notice the randomly generated directory name. I plan on searching for "Google Gears for Firefox" and using its path. I was able to use sqlite (version 3 required) to open the two top level ".db" files and the attachments and emails themselves are stores in nested directories; for example, on my system, I am looking at
ls -asl ~/Library/Caches/Firefox/Profiles/btzzru2q.default/Google Gears for Firefox/mail.google.com/https_443/GoogleMail\[12\]#localserver/10
and I see the HTML text for several emails and their attachments.

Before I stop using my old backup scheme I want to feel secure that I can access old emails independently of GMail. I may keep using my GData Google Docs script because I can convert all of my documents to OpenOffice.org format before downloading and archiving them.

In any case, local persistence with Gears should help Google convince more people to rely on their "office in a cloud".

No comments: