How to Recover a Mailbox from a cPanel Full Backup

How to Recover a Mailbox from a cPanel Full Backup

This article discusses steps you can use to recover a mailbox from a cPanel full backup, either when your email account has corrupt or missing data, or when moving to a different host.

The process of recovering single or multiple email accounts from a full cPanel backup involves extracting the compressed file, and then locating and copying the missing mail data. If the email account is also missing, create it first, and then copy the data from the backup.

Generally, a full backup contains all the domain files, including applications, email, databases, and others which you may not wish to copy to a new server.

Step 1:

Locate or Create a cPanel Full Backup

In most cases, the backup file will be in the root folder, or, as a download on a local drive. To access your backup file.

  • Login to your domain cPanel account using the URL in the format:

http://Yourdomain_name.com/cpanel orhttp://Yourdomain_name.com:2083

  • Enter your cPanel username and password.
  • Navigate to Files and open the File Manager.

  • Look for the full cPanel backup file in the home folder or local drive. This is usually a large file in Megabytes (MBs) or Gigabytes (GBs) depending on the size of your website. It has an extension .tar.gz and in the format – backup-date_time_cpanelusername.tar.gz

  • If you have a backup file, proceed to step 2. If not, follow the instructions below to create one.

Create a cPanel Full Backup

If you are moving your email to a new host, you can create the full backup using the cPanel inbuilt backup tool. This allows you to perform selective or full backup or restore.

  • Navigate to the Files in cPanel and open the Backup or Backup Wizard.

In our case, we will work with the Backup option.

  • Click on the Backup and select the Download Full Website Backup option.

  • Select the location to store the backup. The default is the Home Directory, but you can also select a Remote FTP Server location on another server, especially if you are migrating to a new host.

  • Add an email if you want the system will send you a notification once the backup is complete. If you do not want the notification, select Do not send email notification of backup completion.
  • Click Generate Backup

Once complete, you can download the backup from the links on the backup page. Each file has the date and time of backup details in its filename.

Alternatively, you can browse to your home directory and locate the file. If you moving to a different server, you can either move it there using FTP, or download to a local computer, extract the email files, and upload to the new server.

Step 2

Decompress the cPanel Full Backup File

  • Locate the backup file on your server or computer.
  • Copy the backup file to a new folder

If you want to restore emails on the same server or a different server, do not extract the files in the root folder to avoid overwriting others.

  • Create a new folder using the cPanel file manager.
  • Select the file and click copy
  • Type the name of the new folder where you want to store and extract the file.

Alternatively, download the file to your local drive and extract it there. This may take time depending on the size of the backup file and your internet connection speed.

  • Go to the folder with the backup file.
  • Right-click the file, choose extract or click the Extract at the toolbar at the top.

If on a computer use WinRAR or 7zip in Windows, or inbuilt tar tools in Linux to extract the files onto your local machine.

  • Access the decompressed archive. The first level folder will be the homedir and will have a Mail subdirectory which holds all the domain mailboxes, each with its email data.

The location of the email folder is usually in the format:

home/user/mail/yourdomainname.com/mailaccountname/

Where

  • user is the cPanel account username for the email address
  • Yourdomainname.com is your registered domain and
  • Mailaccountname is the unique name of your mailbox.
  • Go to the Homedir directory

  • Open the Mail folder. This opens up the folder and displays the domains on the hosting account.
  • Open the domain folder where you want to recover your email accounts. This gives the email folders, each the same name as the username of corresponding email account. For example, if you want to restore the email account info@yourdomain_name.com , you will find folder Info.

If you are within the same server, you can just copy the email folder across to the folder with the lost email files. When restoring to a different server, you need to compress all the files in the folder to create a single file that you can easily download and upload.

If the email account that is missing data is still on the server go to step 4. If not, use the following steps to recreate a new email account and associated folders.

Step 3

Recreating Email Account

If your email account is missing, or you are restoring the email data on a new server, you need to recreate it in the cPanel. This will automatically create the folder. To create the email account,

  • Log in to cPanel
  • Navigate to Email Accounts under Email.

  • Click on Add Email Account

  • Enter the email username or part preceding the @sign and ensure that you have the correct domain.
  • Type and confirm the password, then click create the account.
  • Choose the Send welcome email with mail client configuration instructions, so that the system can automatically send an email to the email address owner on how to configure the different clients.

Once you have the email account and mailbox, you can now copy the files from the backup to using the following procedure.

Step 4

Restoring Data on the Same Server

  • Highlight the email folder you want to recover and click copy. (Select all folders if recovering multiple email accounts)

  • Type the destination folder for the email data and click Copy File(s) – this should be the folder for the domain whose email account is missing data and in the format: home/cpanelusername/mail/domainname

This restores all your messages up to the date and time you performed the backup. The users can now use their accounts and have access to all their older emails.

Copying Email Data to a Different Server

If you want to recover an email account on a different server, use the following procedure.

  • Highlight the email folder you want to transfer to the new server and click Compress.

  • Highlight the compressed file and click Download to save it to a local folder.

  • Download the file to your computer and note its location.
  • Go to the new server and open the location of the email account folder where you want to restore files. This will be in the form
Home/cPanel username/mail/yourdomain_name.com
  • On the new server click Upload

On your local machine, select the file you downloaded from the backup and upload it to the domain folder in the mail directory.

(Please note that you can also use FTP to transfer the file to the new server. In this case, you may not need to download to the local machine (unless the backup is on a local drive) and can do a transfer from the old server to the new one.)

  • Once the process is complete, go to the folder and select the uploaded file
  • Click Extract

This extracts the files into the new email folder or that which is missing data, and you can now start accessing your emails. However, this will only give emails up to the date of the backup.

Conclusion

Data backups are critical components of a digital system, including servers, computers, phones and other electronic systems. It prevents loss of data while ensuring continuity and less downtime. Domain owners can use the inbuilt cPanel features to perform regular data backups and restores.

A full cPanel backup file contains all the domain files and data. If you only want to recover email, you will need to extract the full cPanel backup file, locate the email account files, and finally copy them to the incomplete mailbox.

Check out these top 3 cPanel hosting services:

Hostinger
$2.99 /mo
Starting price
Visit Hostinger
Rating based on expert review
  • User Friendly
    4.7
  • Support
    4.7
  • Features
    4.8
  • Reliability
    4.8
  • Pricing
    4.7
HostArmada
$2.49 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
FastComet
$1.79 /mo
Starting price
Visit FastComet
Rating based on expert review
  • User Friendly
    4.7
  • Support
    5.0
  • Features
    4.8
  • Reliability
    4.5
  • Pricing
    5.0
  • Click this link and all your queries to best hosting will end.

How To Install Latest Roundcube Webmail On Ubuntu 18.04 LTS

This tutorial will explain the different steps to install Roundcube on your Ubun
5 min read
Arvind Singh
Arvind Singh
Hosting Expert
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top