Showing posts with label gmail. Show all posts
Showing posts with label gmail. Show all posts

Monday, February 11, 2008

Gmail IMAP backup

Today I decided to try out Gmail IMAP. Untill today I downloaded mail via POP from gmail and keep them in my home IMAP server. This way I was able to use thunderbird and have my mail synched on all my computers. Now that gmail offer an integrated imap server I decided to switch to that so I'll able to use also gmail web interface and have all synched (before I used to use OverLook that's quite useful, but really slow... at least on my small home server).

In the end now all my mail reside on gmail and I have no local copy (except for thunderbird local file...). I want to keep a local copy of the gmail account to be able to recover from loss of data by google. Also I want it to be synched daily.

Well, the first solution I thought is imapsync.
Here's how to backup a gmail account with it:

imapsync --host1 imap.gmail.com --ssl1 --user1 user@gmail.com \
--password1 gmailPass --host2 local --user2 user@local \
--password2 localPass --prefix2 INBOX.gmail-backup. \
--authuser1 user@gmail.com --authmech1 LOGIN \
--authmech2 LOGIN --syncinternaldates

A more secure way is to put the passwords in 2 file and use --passfile1 and --passfile2.