Back Up Your Gmail

Spare yourself the agony of service outages by keeping a local copy.

Google’s free Gmail service is all kinds of awesome, and it’s generally pretty darn reliable. But like any Web-based service, Gmail can go down. These rare events are cause for amusement at Mac|Life HQ--seriously, have you seen how Twitter freaks out when Gmail is down? You’d think the sun and moon had collided or George Lucas had announced a Broadway musical about the political career of Jar Jar Binks.

Still, if you depend on Gmail for all your über-essential email, it stinks to be kept out of your account even temporarily. Luckily, backing up Gmail is pretty easy and won’t cost you a dime. Ready? We’ll use Mail to store the messages and a combination of Automator and iCal to retrieve them so you don’t even have to open Mail periodically and fetch the emails yourself.

This works best if you’re not already using Mail for your day-to-day emailing and especially if you don’t use it for Gmail. If you’ve already got Mail checking your Gmail through IMAP access, jump right to “Don’t Want to Use Mail?.

And Gmail junkies be warned: This won’t get your labels or your Drafts, and it won’t organize your sent and received email into regular Sent and Inbox folders. All your Gmail goes to one place, but it’s a highly searchable backup.

Difficulty Level: Easy

What You Need:

>> Gmail account (free, mail.google.com)

>> About 20 minutes to get it all set up

1. POP Goes the Gmail

Once you POP, you can't stop.

Log in to Gmail (mail.google.com) and click the Settings link (near the top right). Click the tab for Forwarding And POP/IMAP. In the POP Download section, we want to “Enable POP for all mail (even mail that’s already been downloaded).” For the dropdown, select “Keep Gmail’s copy in the Inbox.” This will let Mail download a copy of all current and new messages, while leaving them in your Gmail inbox for you to read and answer using the Web interface that you know and love.

2. Configure Mail

After Mail's automatic setup, we're good to go.

Launch Mail. If you haven’t used it before, enter your name, email address, and password at the prompts, and check the box for it to Automatically Set Up Account. The next screen will show a summary for your account settings: The incoming mail server will be pop.gmail.com with SSL (secure socket layering) turned on, and outgoing will be smtp.gmail.com with SSL off. Click Create to set up your account and take ’er online. If you have used Mail before, select File > Add New Account and follow the prompts.

3. Watch It Go

Everything gets added to Mail's inbox, but you can find messages with search of Smart Mailboxes.

A regular Mail window will launch, and your mail will start to download. All of it, from as long as you’ve had your Gmail account. I got mine in 2004... that’s a lot of email. It’ll come in chunks of a few hundred messages each, so just click the Get Mail button when you see it stop. We’ll automate the checking part in step 5.

4. Still on the Web

All the messages we downloaded are still on the server, so they're still accessible online.

So now we have a copy of every Gmail message ever sent or received in Mail, yet it’s still on Gmail’s Web interface right where we left it. If you go back and delete some emails from Gmail on the Web, they will stay in your Mail backup. (But you don’t really need to delete stuff from Gmail too often; that’s kind of the point.)

Comments

In fact, there IS a way to use Thunderbird (or any other POP email client) with this method and still schedule it with Automator. I just did it, and it works. I've done this under Snow Leopard, so if you have an earlier version of the OS, you may want to adjust the instructions to fit...

2. Add "Launch Application" as your first action, and select "Thunderbird" from the pull-down menu of available apps. (You can find this or any other action using Automator's search bar.)

3. Now we'll want Thunderbird to pause long enough to check for new email. So the next action to add is "Pause." You can set this for any amount of seconds, minutes, or hours that you wish. I set mine for 3 minutes, which should be more than long enough for Thunderbird to check for any new mail and bring it down.

4. Now that Thunderbird has checked for mail, you can either choose to let it remain up, or have it automatically quit. If you want Thunderbird to remain up, skip to step 5. If you want it to quit automatically after checking for mail, do the following:

-Add "Quit Application" as your final action in the workflow and select "Thunderbird" from the pulldown menu.

5. That's it! Now you select "Save", and Automator will prompt you to give a name to your new iCal alarm. Once you enter the name, iCal will launch automatically and, as noted in the above article, will give you options for your new event. Edit those as shown in the article, and you're done.

For extra security, I use this in tandem with a freeware program called Email Backup 2.5, from Squashed Software. This will allow you to back up your email profile from all of the major Mac email programs, including Apple Mail, Microsoft Office (versions X through 2011), Thunderbird, and Eudora 6. Email Backup 2.5 is available at Squashed Software's website. (I can't include the URL, because MacLife's spam filter treats my post as spam if I try; but just search for Squashed Software in Google and you should have no trouble finding it.)

Backup Gmail Address book is also the big issue,isnt'it.
How do you backup them? By vCard/CSV export?
But we have to know we can't save photo by vcard/csv.
I searched for a good tool for backuping, and found.
http://www.egg-on-egg.com/
It can Backup/restore photos. Wow! This is it!
How do you rate this?

>now we have a copy of every Gmail message ever sent or received in Mail
No, we don't. I followed the instructions in setting up Mail to download all my Gmail messages, but it only downloaded the ones from 2008 -- nothing since. Does Mail (2.x) have a limit on the number of message sa mailbox can hold or something? Any help appreciated. I really need to have local copies of all my Gmails for my records. Thanks.