Here is a good tool for Gmail users, GMail Backup. The latest release come back in October with the seventh pre-final release of the GMail Backup tool. This program is aimed to backup and restore of your GMail mailbox. You will need to activate the IMAP access to your mailbox, to do so, please open your GMail settings and under POP/IMAP tab activate this option.
To perform full backup of your GMail account into directory dir, use:
gmail-backup.exe backup dir firstname.lastname@example.org password
To specify time interval, you can add additional date specification in the format YYYYMMDD. The second date can be ommited in which case the backup is from the first date to now:
gmail-backup.exe backup dir email@example.com password 20070621 20080101
You can do multiple backups into the same directory. The labels.txt is updated according the new e-mails not in the previous backup.
To restore your backup use the restore command. To restore your GMail account from the previous backup in the directory dir, use for example:
gmail-backup.exe restore dir firstname.lastname@example.org password
You can also use the extra feature of GMail backup. It allows the user to completely clear his mailbox (for example if the user wants to end using the GMail). All messages are permanently deleted (of course the email can be stored somewhere deep in the Google company). To do so, execute the command:
gmail-backup.exe clear email@example.com password
The program will ask you to repeat the username, so you have the chance to cancel your mistake.