I'd like to import mail from one account to another, but I have 10 or so labels in the one I want to export from. What's the easiest way to get the same labels on the same email messages on the new account?


5 Answers 5


I successfully used Got Your Back (GYB) to move 7 years of messages (with labels!) from a @gmail.com account to my new Google Apps account at my own domain. Here's how:

Backing up your old @gmail.com account

  1. Download GYB and unzip it somewhere. (I'm on a Mac so I used the "Python Source" version, but if you're on Windows you'll need that version instead.)

  2. Open a command prompt or terminal and change to the folder you unzipped GYB into.

  3. Use the following command to make a backup of your old Gmail account. If you're using the Windows version, replace the python gyb.py part with gyb.exe.

    python gyb.py --email=[email protected] --action=backup

  4. GYB will open a web page to request access to your old Gmail account. Sign in with your old Gmail credentials and grant it access.

  5. Wait for your mail to be downloaded. I had 800 MB of mail in the account, and it took around half an hour.

By default, the backup will be located in a folder named [email protected].

Restoring the backup to your new Google Apps account

  1. Type the command below. Again, if you're on Windows, replace python gyb.py with gyb.exe.

    python gyb.py --email=[email protected] --action=restore --folder=GYB-GMail-Backup-[email protected]

  2. Once again, GYB will open a web page so you can grant it access. Be sure to sign in to your new Google Apps account this time.

  3. Switch back to GYB and wait for your backup to be restored to the new account. This took much longer for me -- at least 4 or 5 hours with 800MB of mail.


  • After I restored the backup, my old sent messages were labeled "\Sent" instead of actually being listed under Sent Messages. I'm assuming this is because it's not possible to actually place a message in the Sent Messages "folder". I just renamed the label to something like "Old Sent Messages".
  • Filters are not backed up, but there is a feature available in Labs that allows you to export/import them separately.
  • Chats, Spam and Trash are not exported.
  • Multi-word labels ended up being duplicated. I had a label named Work Stuff, and all of its messages were labeled both "Work and Stuff" after the restore. I just deleted one of the duplicates and renamed the other.
  • I don't know if a message's starred status is exported, since I didn't have any.
  • The command line argument --folder doesn't work for me, instead use --local-folder. Other than that, this guide still works for the current version of gyb.
    – P A N
    Oct 4, 2015 at 6:59

In the Google Knol: Changing your gmail username or email address, it says:

If you absolutely need the old label structure, the only solution is to use an IMAP client to connect to both the old and new account and copy over folders/labels. But this solution can be tricky, because you can only copy over a certain (unspecified) amount of mail at a time. The non-Google program Gmail Backup might be able to assist with this process, but I can't vouch for its effectiveness.


You can do the following:

Caution: do this at your own risk. If you accidentally press delete while in the trash, your messages will be gone forever.

  1. Clear your trash on your old account.
  2. Trash all your messages in your old account.
  3. Untrash a single label.
  4. Import the messages to your new account using the POP3 feature (Get mail from other accounts).
  5. Tag all these new messages with the same label you used on your old account.
  6. In your old account, trash the messages that were imported successfully.
  7. Repeat steps 2-5 for each label.
  8. Untrash your messages.

This will probably only help you if you use labels as folders (i.e. one label per message). Otherwise your POP3 client will have already read messages from before and it gets messy. If you don't mind messages having the exact same tags, then it's fine.


I just tried it, and this should work. The reason it works is that when you put messages in the trash, two things happen:

  • The labels are preserved.
  • POP3 clients will not see the messages.

Note: When you trash the messages from the All mail folder, the following misleading message will be shown:

Moving conversations from All Mail to the Trash will remove them from all views, including labels and search results. This is because in Gmail, a conversation can be displayed in a variety of views, but there is only one copy. Are you sure you want to move the only copy to the Trash?

It sounds as though the labels will be removed, but in fact they will be preserved in the trash. It's just letting you know that when you click on one of the labels on the left, you will no longer see the message since it is in the trash.

  • 1
    Clever! I'll be interested to hear if it works for you. Jul 1, 2010 at 0:56
  • how does this cope with a message having more then one label? Jul 16, 2010 at 23:23
  • @Ian: it wouldn't work with more than 1 label, which is why I wrote that it would only work if you use them as folders.
    – Senseful
    Jul 16, 2010 at 23:25

If your labels are applied based on some basic rules you could apply some filters to automatically label mail appropriately and use one of googles suggested methods to import mail from your old gmail account


You can use Microsoft Outlook to do this:

  1. Install Microsoft Outlook.
  2. Open Outlook, log on to the two Gmail accounts.
  3. Now you will see the Gmail labels showing up as folders on the left. Simply select all the emails you want to move (hold command or shift when selecting multiple), and click Move on the menu bar, select the destination folder/label in your other account.
  4. Refresh and give it a day to update the new update on Google's server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.