Skip to main content

Backing up your Gmail

One of the common questions we receive in the Gmail Help Community is regarding the backing up of emails. At one point in time, 15 GB of storage was considered sufficient to store emails. Not so much these days, especially with the volume of the emails we receive today and the size of the attachments included therein.

My standard advice is to consider the following options to take a backup of your Gmail:

  1. For new Gmail accounts, forwarding to other email addresses.
  2. For older Gmail accounts, back up to another email address using POP3.
  3. Using Google Takeout.
  4. Using an email client such as Mozilla Thunderbird using POP3.
  5. Using GYB - a command line utility.
In this article, we will look into each of those options so that they become easier for everyone to understand and follow if they want to enable one or more of these options on their Gmail. 

Note: One important thing we always advise the users to keep in mind is that the chosen backup method or process should also provide an option to restore the backed-up messages to the original or an alternate email address, typically Gmail. A backup that doesn't provide an option to subsequently view or restore the messages is not a backup.

Section 1: For new Gmail accounts, forwarding to other email addresses.

Forwarding options work from that moment onwards. So, enabling them on older accounts doesn't make much sense unless the currently existing emails are inconsequential or the account is made completely empty in anticipation of starting something new.

Note: There are two ways to forward messages from Gmail - one that forwards all incoming messages, and the other that forwards messages that match a filter definition. As we are talking about backing up messages, we would first look at the option that forwards all messages.

To begin, we visit the "Forwarding and POP/IMAP" tab under Gmail settings - https://mail.google.com/mail/u/0/#settings/fwdandpop and click on the highlighted button as shown below.


This would present a small pop-up window where we need to enter the email address we want the messages to be forwarded and thereafter click on the blue Next button.


The next window will require us to confirm the forwarding email address and click on the Proceed button.


We're then notified that a confirmation code is sent to the forwarding email address and we must access that account to retrieve that code.


The Forwarding section now includes the option to enter the verification code sent to the forwarding address.


Upon signing in to the forwarding email address, we now see a message from forwarding-noreply@google.com with the subject field containing the verification code and a mention of the original Gmail address.


There are two ways to complete the forwarding verification process.
  1. Click on the link included in the verification email sent to the forwarding email address.
  2. Copy the 9-digit confirmation code from the message received in the other account and enter it in the Confirmation code field in the Forwarding section of the Gmail address messages are being forwarded from.
That done, we shall see the following screen where it defaults to Disable Forwarding and we need to manually select the Forwarding and other related actions.


To forward selected messages using a filter we can either click on the "Creating a filter!" link or manually proceed to create a filter through either the Search box at the top of the Gmail page or by clicking on the "Create a new filter" link from the "Filters and Blocked Addresses" tab under Gmail settings - https://mail.google.com/mail/u/0/#settings/filters.

In the first screen, we create our search criteria and in the next screen, we define our filter actions.





If we already have a forwarding added setup, it will show up as an option.


After clicking on the Create filter button, we can check for it under the "Filters and Blocked Addresses" tab under Gmail settings.


As before, we see that option in the Forwarding section within the "Forwarding and POP/IMAP" tab under Gmail settings.


Note: You can choose to forward all of your new messages to another email address, or only forward certain types of messages to multiple other accounts. How each account is used to forward messages from the Gmail address can be seen by clicking on the email address drop-down box.


Section 2: For older Gmail accounts, back up to another Gmail address using POP3.

The preferred option is using the POP3 option and it is done in two parts. 

In the first part, on our original account (a*****@gmail.com), we need to enable POP from the "Forwarding and POP/IMAP" tab under Gmail settings by selecting one of the two provided options and also deciding what to do with the fetched messages in the original account in step 2.



In the second part, on the other account (s*****@gmail.com), from the "Accounts and Import" tab under Gmail settings, we scroll down to the Check email from other accounts section and click on the Add an email account link.


This will bring up a new window to include the necessary details.



Clicking on the Next button will bring us to the credential page for the account we are to fetch emails from. Please note the default values for the POP3 server and the Port as they would need to change.


The default POP server name is pop.gmail.com and we need to check the second box for SSL and change the Port to 995.

As our original account is 2SV enabled, entering the regular password will generate an error message that an App password is required.


So, we visit the https://support.google.com/mail/answer/185833?hl=en-GB help article on how to generate an app password and enter it in the password field to complete the process.

Note: Checking the box for the first option may throw an error message as that option needs to be selected via step 2 in the original account, something we have already done. If that is what happens, just leave that box unchecked.

Once completed, the window prompts if we plan to include the original account also as a "Send mail as" option. If we select the "No" option, we complete the process. If we select the "Yes" option, we need to go through the standard "Send mail as" process to see the screenshot as shown below.


Note: Setting up mail fetching or forwarding can also come in handy in certain account recovery scenarios, where the verification code is sent to the same account the user is attempting to recover; discussed in this blog article - https://blogs-on-gmail.blogspot.com/2023/12/codes-sent-to-same-google-account-im.html.


Section 3: Using Google Takeout. 

This process involves downloading messages and attachments from Gmail in MBOX format. User settings from a Gmail account are downloaded in JSON format.

To begin, we visit the Google Takeout page at https://takeout.google.com/. The thing to note is the number of products that are selected for Takeout by default. Since we plan to only Takeout the data for Gmail, we click on the "Deselect all" link.



Then, we scroll down to find Mail and click on the "All Mail data included" button.


This opens up the checkbox for all system-defined and user-created labels, with the "Include all messages in Mail" checkbox selected. If we do not intend to back up all messages, we can uncheck the default option and then check or uncheck individual labels based on our backup requirements. For this blog, I have chosen to export the Inbox and Sent labels.




Now, we scroll down to the bottom of the screen to click on the blue "Next step" button. On the next screen, we select the download destination, file type, file size and frequency before clicking the "Create export" button to start the process.

Once completed, the Takeout page will show the latest exports and the necessary option to download the data.
Note: Gmail doesn't provide a way to restore data in MBOX format and we would need to use an email client like Mozilla Thunderbird to import such data to an email address using Thunderbird's Tools > Import option.

Section 4: Using an email client such as Mozilla Thunderbird using POP3. 

Similar to https://blogs-on-gmail.blogspot.com/2022/10/adding-gmail-to-mozilla-thunderbird.html, except we choose POP3 over IMAP because this is a backup and we need to ensure the emails downloaded and stored in the email client are not affected by any subsequent actions performed in the Gmail web UI, the Gmail mobile apps or any other third-party mobile apps or IMAP email clients.

We start the process by furnishing the basic account details in Thunderbird.


Clicking on the Continue button allows Mozilla to check the configuration details for Gmail in their database. It defaults to IMAP and we have to manually select the POP3 option.


This brings up the POP configuration details for Gmail. We check to confirm the details and click on the Done button.


As our account has 2-step verification turned on, a pop-up window requires us to sign into the Google account.

After a successful verification, we are prompted to allow the necessary permissions to the email client, Mozilla Thunderbird.

Our Google account should now be successfully set up in the email client. For easy reference, we can visit the settings for that Account and assign a name.



We can now see the account in the left panel of the Thunderbird email client.


Section 5: Using GYB - a command line utility.

GYB or Got Your Back is one of the earliest "backup and restore" utility options specific to Gmail. This backup and restore utility is for relatively advanced users as it uses the command line interface for backing up to and restoring from your computer using Gmail's API over HTTPS. The best part of this utility is that it is available for Windows, Mac and Linux users.

All the necessary details related to the utility and the commands are available here - https://github.com/GAM-team/got-your-back/wiki.

As with my other blog articles, if you happen to have any questions on this topic, please post them under comments.

Last updated on: March 28, 2024.

Comments

Popular posts

Gmail 101

Wendy Durham (CWD in her A Gmail Miscellany blog and wdurham in the Gmail Help Forum ) was a Product Expert and a prolific contributor when it came to explaining the intricacies of Gmail and Google accounts. Due to changes to Gmail and Google Accounts over the recent years, some of her well-known blog articles are no longer applicable. The three most used articles have been updated here to be consistent with the current version of Gmail and in some cases, Google Account. This will keep them useful going forward as a tribute to her dedication to user education. The current version of the article is updated based on the changes introduced in the Gmail UI as of January 2022, following the announcement here .  All your Gmail basics in one place! A primer for new users of Gmail, which explains how to find your way around Google's innovative email service and to perform the basic email tasks of reading messages, sending messages and organizing your mail using Gmail's web interface

Revisiting Canned Responses (Templates) in Gmail

I wrote my first blog on Canned Responses here - Exploring the Advanced Tab in Gmail Settings: About Canned Responses , noting "Believe it or not, there is no article on Canned Responses in the Gmail Help Centre. Probably because it has always been a lab feature in the past and now included under the Advanced tab under Gmail settings in new Gmail. So, today we take a look at this very popular feature in Gmail and the different ways we can use it.". That has remained the case, so with a change of UI, there is a need to rewrite the tutorial on how we can perform the following functions for a Canned Response or as they are now known, Templates . Create a Template Insert a Template Edit or Overwrite a Template Delete a Template Thankfully, the pre-requisites haven't changed. To start using Templates in Gmail, it needs to be enabled from the Advanced tab under Gmail settings. As always, be sure to click on the Save Changes button on the bottom of the page.