PaulDotCom mailing list archives

Re: archiving gmail


From: Jonathan Cran <jcran () pwnieexpress com>
Date: Mon, 22 Oct 2012 09:59:26 -0500

I've used the 'larch' gem in combination with running an imapd locally to
pull mail out of gmail and store it. Larch is easy to integrate into (ruby)
apps, and a nice CLI tool too.

Last time i tested was on 10.04 ubuntu, so i'm assuming this still works.
To install larch & dovecot:
  gem install larch # https://github.com/rgrove/larch
  sudo apt-get install dovcot-imapd #
https://help.ubuntu.com/community/Dovecot

To retrieve your mail:
  larch --from imaps://imap.gmail.com --from-user
[user]@gmail.com--from-pass [pass] --to imap://localhost --to-user
[user]

You can retrieve by folder / tag too:   --from-folder=[Folder-to-Archive]

To pull down a couple gigs (~5) it took a while, but somewhere in the realm
of hours, not weeks / months.

Hope it helps and thanks a lot for the reminder :)


jcran


On Mon, Oct 22, 2012 at 9:41 AM, Josh More <jmore () starmind org> wrote:

On Mon, Oct 22, 2012 at 9:28 AM, Robin Wood <robin () digininja org> wrote:
On 22 October 2012 13:55, Josh More <jmore () starmind org> wrote:
I use getmail:  http://pyropus.ca/software/getmail/

You have to run it in a loop, as Google limits the number of messages
you can pull at a time to around 100.  (Sometimes it's 80ish,
sometimes it's 120ish).

I generally find that running:  "for i in {1..20}; do getmail -r
~/.getmail/getmail.gmail; sleep 120; done"  is sufficient for my
backups every few weeks.

I'm sure you could script this in a better way so it automatically
stops when there's no more mail to get.  Lazy script just uses a loop.
 :)


That will take a while then to pull down almost 7G of mails (over 4+
years of data). Maybe not a practical option after all.

Robin


Yes, it will.  I'd do it anyway, as any backup of 7Gb is going to take
a while and, once done, will be fairly easy to maintain.

-Josh More
_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com




-- 
*Jonathan Cran**
*CTO, Pwnie Express
pwnieexpress.com
(P) 515.890.0070

Twitter: @PwnieExpress <http://twitter.com/#%21/pwnieexpress>
Blog: blog.pwnieexpress.com
_______________________________________________
Pauldotcom mailing list
Pauldotcom () mail pauldotcom com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

Current thread: