Restore Email from a Cpanel Backup – for Thunderbird

 

If you’ve moved hosts and saved a full Cpanel backup, here’s a way to recover your old emails.

I’m using the Thunderbird mail client on Ubuntu today and have extracted my Cpanel backup to ~/Downloads, and this may require some command line use to accomplish.

First navigate to the email directory of the backup for the user mailbox you’d like to restore. In my case it is ~/Downloads/backup_folder_name/homedir/mail/.noreply@sprisemedia.com; make sure you have hidden files visible and be looking for the email address of your choice. There was no new email on this account so the command to run is this:

cd ~/Downloads/backup_folder_name/homedir/mail/.noreply@sprisemedia.com/cur

Take a look at the filenames, each file is an email and will need to have the “.eml” extension. If your files do not have the .eml extension (such as in the below image), you will need to add it.spr

At this point Ubuntu does realize these are email files but Thunderbird does not handle them properly. So let us run this command and add “.eml” to all of these filenames:

find . -type f -exec mv '{}' '{}'.eml \;

Now they should all have the proper extension. To get them all imported you will want to install Thunderbird Import Export Tools, simply download the file and follow the simple instructions on the prompt.

The last step is to now go to Tools > ImportExportTools > Import All Messages From A Directory and point it towards your dir full of .eml files. Hooray!

Last updated on