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.
The messages are stored in the local directory in files which names follow the format YYYYMMDD-hhmmss-nn.eml where YYYY is the year, MM the month number, DD is the day number, hh are hours, mm are minutes and ss are seconds when the e-mail was SENT. For the case there is more emails with the same timestamp there is the number nn which starts with value 1. Label assignment is stored in the file labels.txt which is the plain text file and it pairs the emails stored in the file described above with the assigned labels.
To perform full backup of your GMail account into directory dir, use:
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:
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:
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:
The program will ask you to repeat the username, so you have the chance to cancel your mistake.
If your internet provider does not allow you access the IMAP ports in the internet, than you will not be able to download the emails from GMail.