This is very important to backup all your emails in your hosting account to your local computer in a regular basic especially if the emails are very important to you.

How Emails Store in Hosting Account?

Before we discuss how to backup the emails in your hosting account to your local computer, we will go through the topics “How Emails Store in Hosting Account (Chapter 1 – 7)”. Then we will discuss “How to Back Up Emails to Your Local Computer” and “How to Restore Emails to Your Hosting Account.

Chapter 1 : Introduction how emails saved in hosting account

This is useful to get a basic knowledge of the storage system of emails in your hosting account. After you go through this tutorial, you should be:

  • Understand the filling structures of all emails storing in your hosting account.
  • Know how to back-up your emails to your own computer.
  • Know how to restore your emails to a new hosting account in case our servers were destroyed due to accident.

Chapter 2 : Which folder emails will be saved in?

The first time you access your new hosting account, you should notice the following folders in your home directory:

  • mail
  • public_ftp
  • public_html
  • tmp

Each folder has a specific function. And all your emails will be saved in the mail folder.

Note:

  1. We will use neomail and FTP_WS for the demonstration.
  2. Assume our domain is testmail.com.

Chapter 3 : Email file structure of a new web hosting account

Now, let’s go inside the mail folder and check. Since this is a new hosting account, there is only one file with the name “inbox” inside the mail folder.

Please note that this inbox is your main email address and is your “catch all” email address by default. This main email address is username@YourDomain.com.

What is “catch all” email address?

This is the email address that all un-route emails under your domain will be sent to mail box.

If you never use the main email address, it always has a inbox only. However, after you use this main email account to compose and send new emails. The “sent-mail” and “saved-messages” files will be created automatically. Moreover, if you delete a email, the “neomail-trash” file will also be created automatically.

Note:
You should always check the “catch all” mail box and delete all un-used emails.

Chapter 4 : Create first email account

Okay, let’s see what happen to the file structures when you login your cPanel and create your first email account.

Assume that we had created the following first email account:

  • alex.

Now, check what happen inside the mail folder.

What happens?

  • A new folder with the name “alex” was created under the mail folder.
  • A new folder with the domain name “testmail.com” is also created. Let’s call this “domain name folder”

There is only one “inbox” file inside the “alex” folder. As you may noticed later that there is always only a “inbox” file inside this folder.

And there is also a folder with the name “alex” inside the domain name folder. There is also only one “inbox” file inside the “alex” folder at this moment.

If you go back to the home directory of your account, you will notice that a new ‘etc’ folder was created. This is where the usernames and passwords of your email accounts will be saved.

We will create more email accounts in the next chaper. Please read on…..

Chapter 5 : Create more email accounts

We now created more email accounts. Let’s see what happen to the file structures. Assume that we had just created the following email accounts:

  • alex.
  • andy
  • general

You should noticed that each email account has an individual folder! And there is also only one “inbox” file inside each folder

Moreover there is also a folder for each email account inside the domain name folder!

In the next chapter we will inspect the folders of each email account.

Chapter 6 : Inbox folder and Working folder

Now, you may wonder why there are two folders for each email account:

  • a folder under the mail folder (inbox folder)
  • a folder under the domain name folder (working folder)

Actually, you may consider the first folder (inbox folder) as a “backup” for the inbox file. And the second folder (working folder) is used to save all your emails.

If you don’t understand, don’t worry. Everything should be cleared when the email accounts have been running for some time.

Chapter 7 : How emails save inside the mail folder

I will take the “general” email account as an example. Assume that the “general” account have sent and received a lot of emails after some time. We also created and moved related emails to the following folders:

  • signup_record
  • transfer_record
  • useful_info

Now, check the files inside the working folder of “general” email account.

You can see that all emails and created folders are saved inside this working folder!

  • the “neomail-trash” file will be created automatically when you delete emails.
  • the “saved-messages” file will be created automatically when you use the email account.
  • the “sent-mail” file will be created automatically when you sent the first email.
  • When you created folders (signup_record, transfer_record, useful_info) in the email account, the files will be created.

Now check what happen to the “inbox” folder of “general” email account.

Yes, this folder will also keep a inbox file with the same content! Therefore you may consider the “inbox” folder as a back-up of the inbox file.

Now you already have some basic knowledge of the storage system of emails in your hosting account. You should be able to know how to backup and restore the emails to your local computer. Please read on…

How to Back-up Emails to Local Computer

Before you start this tutorial, you must read the tutorial of Email Storage Structure (Chapter 3 : Email file structure of a new web hosting account) first.

Backup your emails is very simple.

  1. Open and connect your FTP client to your hosting account.
  2. Download the etc folder and all contents inside the mail folder to your own computer.
  3. Download the mail folder and all contents inside the mail folder to your own computer.
  4. Done!

How to Restore Emails to Your Hosting Account

Before you start this tutorial, you must:

  1. Read the tutorial of Email Storage Structure (Chapter 3 : Email file structure of a new web hosting account) first, and
  2. Read the tutorial of Back-up Emails to Your Own Computer (How to Back-up Emails to Local Computer)

Restore your emails is also very simple.

If you want to restore all emails to your hosting account:

  1. Open and connect your FTP client to your hosting account.
  2. Upload the etc folder and all contents in your own computer to the root directory of your hosting account.
  3. Upload the mail folder and all contents inside the mail folder in your own computer to your hosting account.
  4. Done!

Of course, you may restore the email accounts one by one. Simply upload the files one by one.