The Digg Crew wants to hear your thoughts!
Please take our short survey about Digg and potential feature ideas.
Geek to Live: Back up Gmail with fetchmail
lifehacker.com — Instead, today we'll set up a nightly automated Gmail backup using the command line program fetchmail, which will go out, grab your newest messages, save 'em to your hard drive and exit, all while you sleep soundly in the knowledge that you've got an offline copy of your important email.
- 853 diggs
- digg it
- utcursch, on 10/12/2007, -0/+16The article is aimed at Windows users, but it's based on a Linux.com article. Here's how you do it on Linux:
http://www.linux.com/article.pl?sid=05/10/07/172259- dbr_onix, on 10/12/2007, -0/+4It's pretty much identical doing it on linux (Seeing as how Cygwin is basicly linux-applications-on-Windows).
Just ignore the Cygwin installtion : Use [yum/apt-get/packman install]/emerge fetchmail instead,
and ignore the task-scheduler (Use cron instead, vim /etc/crontab, and append : " 0 0 * * * [username] fetchmail -k " to /etc/crontab (sudo nano /etc/crontab). That'll run it every night at midnight (The first two zeros are the time, to run it at 3:30am, change it to 3 and 30)
Also, I'm using chmod 600 for the .fetchmail (Seeing as it has my email password), and it's working fine (no need for chmod 710, atleast on Linux)
- Ben - JonForTheWin, on 10/12/2007, -0/+3And who's _the_ maintaner for Fetchmail? Eric S. Raymond himself. w00t
- dbr_onix, on 10/12/2007, -0/+4It's pretty much identical doing it on linux (Seeing as how Cygwin is basicly linux-applications-on-Windows).
- rodrigo74, on 10/12/2007, -1/+10The Linux instructions should work on Mac OS X too, BTW.
- lar3ry, on 10/12/2007, -0/+3I've been doing this ever since GMail offered POP3 access.
I've been a big fan of backups, almost to the point of distraction. I don't think Google is going out of business anytime soon, but my email is my email...!
lar3ry - DoubtfulSalmon, on 10/12/2007, -0/+1Ditto, I've been running nightly backups on all my gmail accounts for ages. It serves two porpoises: first, a backup, second, by removing from the server it's skipping neatly around that crazy american legal loophole that allows google access to the contents of the emails after 90 days if I've left them up there.
- jdong, on 10/24/2007, -1/+2@DoubtfulSalmon: Dude! Sweet! Your e-mail serves two cute little dolphin-like animals!
- kylog, on 10/12/2007, -0/+0DoubtfulSalmon: say more about this 90 day loophole. News to me, but I fear Big Brother Google.
- lar3ry, on 10/12/2007, -0/+3I've been doing this ever since GMail offered POP3 access.
- Hypodrive, on 10/12/2007, -0/+4Good thing Gmail doesnt let spam get to the inbox.
- DoubtfulSalmon, on 10/12/2007, -0/+1funny, 99% of the stuff that arrives at my gmail accounts is spam... So I fetchmail it down to my local machine, and automagically sort it straight into the 'spam' box... then I have another script that automagically submits it all to spamcop!
- mohit007, on 10/12/2007, -4/+9Whats the point?? Gmail supports POP. Such utility is not required...
- mrWoot, on 10/12/2007, -6/+2Yes, but you have to download the emails sometime. The purpose of this is to have a program do it itself every night when you're not on it automatically. Thus, WHEN gmail goes down, you're not stranded.
- gwill11, on 10/12/2007, -4/+8And when is the last time Gmail went down?....I cant remember.
- neoform, on 10/12/2007, -2/+4Forget that it supports pop..
why would you even need to back that up? does anyone think that gmail will ever go down? how many accounts out of the 53million they have, have lost their email? - jhaven, on 10/12/2007, -0/+7@gwill11: "And when is the last time Gmail went down?"
More frequently than you might think. Last time it affected me was back in December for around 13 hours or so.
There's an entire Google Group for people to report Gmail outages here: http://groups.google.com/group/Gmail-down - laser314, on 10/12/2007, -0/+4I use gmail so I don't have to worry about backing up my email, I let them worry about it. Granted, I don't have any Important Email. Ah, the simple life of a blue collar worker. I do have email backed up dating back to 1997 though. Perhaps I should write a script to automagically send all my "preGmail" email to Google for long term storage.
- nixr, on 10/12/2007, -1/+1I guess this tool is kinda neat but it's really no different than, as has been mentioned, using a POP client and setting GMail to keep a copy on the server. You can set a POP client to fetch mail at any interval you choose so this tool isn't really all that necessary in my opinion. To each his own I suppose.
- maddskillz, on 10/12/2007, -0/+0The point is to save process cycles. What we are saving them for, I am not really sure. I know most of the time my computer is fairly underutilized.
Remember: Just because you can do something, doesn't mean you should! - dbr_onix, on 10/12/2007, -0/+4"You can set a POP client to fetch mail at any interval you choose so this tool isn't really all that necessary in my opinion"
Fetchmail *is* a POP client, but with no GUI - As the article states, running an entire client just to back up emails is excessive.
If you have a server you trust (I have a spare linuxy-machine running, which I just set fetchmail up on), setting up fetchmail to grab the emails once a day (Which took less than 5 minutes, a single command to install fetchmail, create one tiny config file, then add a line to /etc/crontab), then forgetting about it is very little work. It'll be useful if, for what ever reason, GMail suddenly goes down/dies/etc, you have all your emails backed up. And as stated lower-down, you can use it with any POP mail account, or even use fetchmail to foward other accounts to GMail.
Also, leaving fetchmail to run once a day in the background is far less obtrusive and more reliable than running a full GUI client.
- Ben - DoubtfulSalmon, on 10/12/2007, -0/+2"Perhaps I should write a script to automagically send all my "preGmail" email to Google for long term storage."
That would be a really bad idea. Email stored on gmail is only "email" for the first 90 days, after that, it's "data". Legally, they're not allowed to parse, read, index, play-with your "email", but they can do what they like with your "data". It's a crazy legal situation, for sure.
Get your gmail off of gmail in the first 90 days folks! - betovarg, on 10/12/2007, -0/+1Basically, your account is owned by google. There are several blog entries of people whos google account has been deleted and didnt get the info back. Read the agreement you agreed on, google has permission to delete your account at any time.
- wakaseoo, on 10/12/2007, -0/+1"Perhaps I should write a script to automagically send all my "preGmail" email to Google for long term storage." by laser314
That's pretty easy but be warned: The "date" in gemail is the received dat, not the submitted date. As such all "pre-gmails" messages you import will appear whith the date when you ran the script.
- mohit007, on 10/12/2007, -1/+4Same thing can be done with any POP client. I am coming to Digg after a long time and seems either I have lost my brains or Digg is taken over by stupid people.
- docjeff, on 10/12/2007, -1/+1Not every mail client supports secure (SSL) pop though...
- mapkinase, on 10/12/2007, -1/+1Can I get all my mailboxes (Sent, e.g.)? Does it gets attachments?
- dbr_onix, on 10/12/2007, -0/+1GMail seems to forward sent mail just like received mail, so yes.
A more "important" issue would be to to retain things like tags, but I'm pretty sure that would require either a change on Google's part, and/or some reimplementation of the POP protocol, or something that scrapes emails from the web-interface.. Or, I wonder if there's a GMail RSS/Atom feed, which could keep a lot more information..
- Ben - wakaseoo, on 10/12/2007, -0/+1tags would appear very easily with an IMAP implementation instead of this outdated pop...
- dbr_onix, on 10/12/2007, -0/+1GMail seems to forward sent mail just like received mail, so yes.
- dukem72, on 10/12/2007, -3/+2Instead of fetchmail why not use Thunderbird and create a new account for your gmail account and when you open thunderbird to check that one or other accounts it will keep it up to date and with all your messages.
- dbr_onix, on 10/12/2007, -0/+2Why are you suggesting that again? The second paragraph of the article explains why, "While it's possible to download your Gmail with a POP client like Thunderbird, constantly running a program just to backup your email consumes CPU cycles and memory."
FetchMail uses no resources most of the time (Well, a tiny bit of hard-drive space, but no more than a single MP3), and can be set to run once a day, when your not using your computer (sometime during the night, say. Although chances are, even if it ran every minute you'd not notice it). And you could use any server that has fetchmail installed (and that you have access to) to back up.
- Ben
- dbr_onix, on 10/12/2007, -0/+2Why are you suggesting that again? The second paragraph of the article explains why, "While it's possible to download your Gmail with a POP client like Thunderbird, constantly running a program just to backup your email consumes CPU cycles and memory."
- flink405, on 10/12/2007, -3/+0A solution in search of a problem...
Doesn´t this kind of defeat the purpose of Gmail or any other email service?
Why download emails to your hard drive, leave them at Gmail.- dbr_onix, on 10/12/2007, -1/+1Not really, backups are a good thing - Sure, GMail is pretty reliable, but it wont necessarily be around for ever (and accessible at all times), and it's nice to have a local copy of emails (for any number of reasons)
- Ben
- dbr_onix, on 10/12/2007, -1/+1Not really, backups are a good thing - Sure, GMail is pretty reliable, but it wont necessarily be around for ever (and accessible at all times), and it's nice to have a local copy of emails (for any number of reasons)
- ThatsUnpossible, on 10/12/2007, -0/+2This is nice, but what I really want is a way to transfer all of my email in gmail to another gmail account, while retaining all the labels, conversations, etc. (Moving from my old gmail account to a new gmail for domains account.)
- kflasch, on 10/12/2007, -0/+5The funny thing about some of these comments is that fetchmail IS using POP. The utility of this - as stated - is to have periodic, unattended backups of your email. It is possible one would want this if you or - god forbid - Gmail goes offline.
- sebnukem, on 10/12/2007, -0/+2I actually use Gmail to back up important stuff, not the other way around. I'd trust the Google farm more than my aging IDE drive.
- nixr, on 10/12/2007, -0/+3I do this also. Primarily to have easy access to all my email in one location but also as a backup in case my ISP does something silly. Plus having multiple email accounts all feed into GMail makes it easier to search among them.
- trogdoor, on 10/12/2007, -0/+1fetchmail will work with any email service that can use POP ( which is pretty much all of them ) , it is in no way specific to gmail.
- docjeff, on 10/12/2007, -0/+1Not all mail services support secure pop (SSL) like gmail uses. gmail doesn't use plain old pop3. try using it on port 110 sometime...
- DoverGeek, on 10/12/2007, -0/+2I have used fetchmail for years, but only to consolidate a lot of pop3 mail accounts from various providers to one single mail account that I can process, filter for spam again, and sort messages to various folders for reading.
As far as this article goes, i agree with using an email client to pop your mail. - hakujin, on 10/12/2007, -0/+1Can anyone tell me the syntax for a batch file, or perhaps all via Task Scheduler, if I wanted to have a particular profile on Outlook, to run and send/receive. The reason being: I currently already have an Outlook profile set up to back up my Gmail and not knowing if the extension from fetchmail is even compatible with Outlook, it just seems simplified to have Outlook do this automated.
Any ideas? - PuppadogServant, on 10/12/2007, -5/+2So maybe I'm missing something here (and I'm sure some several of you will get pissed off at me for contradicting a frontpage article - thereby digging me down, but whatever you liberal bunch of *****!)...
I'm supposed to run a behind the scene pop client to get my mail at 2 am because my PC is SO ***** busy during the day that I can't spare 3 minutes TOTAL to open, download, and close the client! Isn't that what eudora or thunderbird (or hell, even outlook!) already does?
How in the hell did this make it to the front page? This is useless information, and I would like the 4 minutes of my life I have wasted on this post back.
Jesus-***** people! How about a useless script that I can write and put on my desktop to automatically log me off, because everyone knows it is too hard to so anyother way!- wakaseoo, on 10/12/2007, -0/+1OK, this article is lame.
However, I'm using fetchmail myself to store mails on my IMAP folder. That way I can use thunderbird, opera or kmail depending on my mood... Plus that's a backup in case gmail is down (as mentioned in the article). An my fetchmail process is run every 10min or so (I want my mail, not wait for the next day)
- wakaseoo, on 10/12/2007, -0/+1OK, this article is lame.
- tpink, on 10/12/2007, -0/+2I was looking for something exactly like this last month. As much as I trust Google, I feel better having a local copy of my e-mail that I can hang on to. I already have a headless Linux box that's on all the time so this is perfect.
- rebotfc, on 10/12/2007, -0/+1Sorry to abuse the comment system, my problem is I have ~ 2 years worth of gmail emails I would like to back up. As I understand it the pop clients only DL the newest emails. Is there a way to backup every email currently stored on gmail (plus attachments).
Thanks.- tpink, on 10/12/2007, -0/+4Yes, in the Gmail Preferences make sure you "Enable POP for all mail (even mail that's already been downloaded)".
One thing I noticed is it only seems to be pulling 800-1000 messages at a time (I have around 14000 over 2.5 years) so I've just been running it multiple times and it seems to be working. - rebotfc, on 10/12/2007, -0/+1thanks for the tip, tpink.
- tpink, on 10/12/2007, -0/+4Yes, in the Gmail Preferences make sure you "Enable POP for all mail (even mail that's already been downloaded)".
- lobbster, on 10/12/2007, -1/+2This Does not make that much sense, why dont you just use outlook or Thunderbird or any other POP email client, that way you can send and receive messages and have an offline copy.
- DoubtfulSalmon, on 10/12/2007, -0/+2If you don't see a need for it, then you probably don't need it. I've been using fetchmail to harvest email from a whole bunch of gmail accounts, and assorted accounts elsewhere, and deliver them into a single email account on my local server at home. Consolidation, big time! I could go through the tedious process of logging in to each account every day, or I can let fetchmail collect all of my mail, and deliver it all to one easy-to-manage place.
It works great for me. This is incredibly useful information.
- DoubtfulSalmon, on 10/12/2007, -0/+2If you don't see a need for it, then you probably don't need it. I've been using fetchmail to harvest email from a whole bunch of gmail accounts, and assorted accounts elsewhere, and deliver them into a single email account on my local server at home. Consolidation, big time! I could go through the tedious process of logging in to each account every day, or I can let fetchmail collect all of my mail, and deliver it all to one easy-to-manage place.
- rtjin, on 10/12/2007, -2/+0Opera has an integrated mail client and fetches everything to your local drive.
- kualla, on 10/12/2007, -0/+1What I have being wondering for a while is how does Google store their email?
If one of their email servers catches fire or a natural disaster occurs, is there a second site with backups? - Farrel, on 10/12/2007, -0/+0I use Google Desktop Search (GDS) on all my computers. I undesrtood that it was cacheing my gmail and thereby fuctioning as a backup. Am I right or wrong?
- goodolboykt, on 08/10/2008, -0/+1Wow works great! and less CPU intensive than using POP e-mail client like Thunderbird
Digg is coming to a city (and computer) near you! Check out all the details on our