Gmail Backup done !

After I found out that also Gmail maybe has a need for Backup I found a few Ideas / Software to made a Backup.

First I remember that now Zarafa is in Fedora ! –> Thanks to kanarip http://planet.ergo-project.org/

So that’s easy setup a Fedora 14 on my KVM Hosts and install the Zarafa Community Version of it.

http://fedoraproject.org/wiki/Zarafa
http://www.ghacks.net/2010/06/16/zarafa-fedoras-exchange-killer/

# yum install zarafa zarafa-webaccess mysql-server httpd

# service mysqld start
# service zarafa-server start
# service zarafa-gateway start
# service zarafa-spooler start 

# zarafa-admin -s
# zarafa-admin -c USERNAME -e USERNAME@localhost -f “Zarafa Tester” -p PASSWORD
# service httpd restart

 

Then go to http://Server/webaccess –> done

maybe also make them persistent against reboot with “chkconfig Servicename on” per Service.

Then the Problem pops up how to sync my Gmail account with the Zarafa Server. So Imapsync was the first choice, but it turns out that it could be tricky not not so performant 🙁

http://www.zarafa.com/wiki/index.php/Imapsync_migrating_to_a_new_server
http://www.linux-france.org/prj/imapsync_list/msg00017.html
http://www.bouthors.fr/wiki/doku.php?id=en:linux:imapsync
http://blog.otelconsulting.com/2010/01/imapsync-to-gmail-script/

# imapsync –noauthmd5 –allowsizemismatch –syncinternaldates –host1 imap.gmail.com –ssl1 –port1 993 –user1 YYYYYYYYYY@gmail.com –password1 XXXXXXX  -sep2 / –prefix2 “” –host2 192.168.1.245 –user2 YYYYYYY –password2 ZZZZZ –folder “[Gmail]/All Mail” –regextrans2 ‘s/[Gmail]/Gmail/’ —useheader ‘Message-Id’ —skipsize –dry

Also the Server need lot of Memory, first I think 512 MB is enough, Wrong I go to 1GB / 2CPU now its better ( see graph, red is swap before go to 1GB). Also the process toke very long and skip lot of mails.

 

so  I search another Methode and found it with OfflineIMAP

“Be aware that this is a Offline Version and will be synced back to Gmail if you delete or change something in the Offline Version next Time you sync !!!!!”

http://www.bramschoenmakers.nl/en/node/713

 

#sudo apt-get install offlineimap

and just add ~/.offlineimaprc to your homedrive

[general]
accounts = GMail
maxsyncaccounts = 3

[Account GMail]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = Maildir
localfolders = /storage/Gmail_Backup

[Repository Remote]
type = IMAP
remotehost = imap.gmail.com
remoteuser = your_username@gmail.com
remotepass = your_password
ssl = yes
maxconnections = 1

#Setting realdelete = yes will Really Delete email from the server.
#Otherwise "deleting" a message will just remove any labels and 
#retain the message in the All Mail folder.
realdelete = no

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *