Gmvault is a great tool by Guillaume Aubert that makes it easy to create a backup of your Gmail emails on your local disk. It is cross-platform (Windows, Mac OS and Linux), supports incremental backups and handles errors that occur during the backup gracefully.
I have been looking for a tool to take automatic backups of my Gmail account for a while and Gmvault fits the bill. What I also wanted was a way to store the backed up files safely on Amazon S3 so I could recover them even if my local disk failed. This functionality is not included in Gmvault but it was quite straight-forward to code.