Can some or all labels be preserved?
One way is to log in using a mail client that supports IMAP. You can then export the emails to a backup location, but this is a bit laborious.
If you want a continuous backup, you could try something like imapsync. This would require you to run your own backup IMAP server and schedule a regular task to perform the synchronisation.
Edit: Preserving labels should work fine, but not quite in the way that Gmail handles them. I've not seen any IMAP or POP3 servers which handle the Gmail label system properly. Gmail presents each tag as a separate folder through IMAP, so as far as the user is concerned, the message exists in several places. (In fact, the inbox is just another label). If you synchronise your account to another IMAP server, you will essentially have multiple copies of the same message.
You can use a nice webapp (sic!) called Backupify to backup all your Gmail data (along with Twitter, Facebook and a bunch of other stuff).
Check out LifeHacker's answer to the same question.
In a nutshell, they said :
- a paid service like Backupify
- Gmail to Hotmail
- your favorite email client as IMAP
- unix 'fetchmail'
Gmail backups have become a somewhat timely topic, as thousands of Gmail users had their account reseted by accident recently.
Here's one more backup solution from the comments to that Engadget post:
I have all my GMail emails forwarded to my Hotmail account, of which all of the emails are downloaded locally on 2 different computers. I've had my Hotmail account since 1998, and I've never lost anything or had a problem so if GMail goes down, Hotmail will still work, and if that goes down, I have it all backed up.
Hopefully with this bump, we'll get even more good, up-to-date answers to the question. (At least gmail-backup.com, mentioned in the accepted answer, now seems defunct.)
Backup your Gmail account for free, without 3rd party software
preserving labels, chats, threads, attachment and whatnot, in a usable portable format
The canonical way to backup the whole lot of your email messages (and a bunch of interesting stuff that Google kknows about you from bookmarks in chrome sync to workouts from Google fit, is trough their Google Takeout service.
It used to be called "Data Liberation Initiative", back in the early year of the millennium, where the objective was making available all the information they collected about you, freely available in useful portable formats, because its "Your data" and if you want to change services, you should be able to take it with you effortlessly (try exporting your outlook.com emails, or a note from Evernote that is not in a proprietary format!)
But can i read them or import them elsewhere? are they in some funky JSON forma i'll need to write a parser for?
For Emails, they provide your data in MBOX files which is arguably the most portable format to store emails, thus preserving threads, headers, attachments, et al, and they can be importes seamlessly to a multitude of both online services and offline email reading packages.
Additionally you can do partial backups (some mailboxes are MASSIVE) by selecting a subset of your labels to be backed up.
Cool, i want in! (or out?)
- head over to https://myaccount.google.com and log in, under "Personal Info and Privacy", select "Control your content" or just follow this url: https://myaccount.google.com/privacy#takeout
- once there, select "Create Archive", which will take you to a screen of everything google knows about you.
- For the purpose of email backup, just deselect all services except Email. This will create an archive of all your email, or if you hit the disclosure triangle it will allow you to choose the labels to be backed up.
Once selected, click ok and scroll down to the bottom of the list of service and hit "Next"
It will then ask you whether you wish your archive to be compressed as .zip, a gzipped tar archive (.tgz) or a bzipped tar archive (.tbz) and whether you want the archive to be sent as a link o your email or dropped on your Google Drive for further cloud massaging, which is quite convenient
When you hit create, the service will start gathering your data from all over Googledom, a process that can take a few hours.
- When its done you'll be notified and your archive of emails will be available for a few days then google will delete it.
Your mailboxes are kept intact, your'e not "taking out" your data, just a copy or backup...
Needless to say, access to this servce requires that you reuthenticate even if you're already logged in, to prevent massive theft of data when carelessly leaving your account oppened. Also, you'll get deferred notificatios via email (sometime after the backup was done, and also when it is retrieved)
So tyhere you go.
I'm kind of find of IMAPSize. It's not the most fully-featured tool you'll ever find, but it backs things up in the most open way possible: each message in it's own file, which could easily be imported into any other e-mail client. It also includes an option for restoring from a backup (though I've never tested that).
Be careful when using IMAP mail clients for backups: I lost some mail at one point because I had thought Thunderbird was keeping local copies of things that it had decided it didn't need to keep. This was a config error on my part, but it's a warning to be careful.
Theoretically speaking, you can open up another gmail account and use it to pop your mail from the first account. You can chain this to have many different gmail accounts backing your mail up.
If you automatically label your messages, then you can redefine the filters in each account so that labels continue to apply.
I developed Gmail Keeper for this. Why I've done that when there are other tools out there? Because I need to backup multiple Gmail accounts on a regular basis, and I don't want to input the login info each time when I need to make a backup.
Both emails and labels will be backed up to local disk in standard file formats (eml and zip). It can also backup the Gmail chat logs if you enable the 'Chats' folder access in the advance IMAP settings in Gmail. However, It's for Windows only.
MailStore Home edition allow backup gmail mail via IMAP.