How to backup emails on cPanel

Whenever recreate the email account it is always better to take emails backup after that you can restore the backup for newly created email accounts.
For email account’s backup we need to login into shell as a root user and follow steps:

cd /home/cPanel-user/mail/yourdomainname.com
mkdir emailbackup
cd email-account-forwhichyouwantbackup
cp -p * ../emailbackup -R
 /home/cPanel-user/mail/your-domain-name.com/emailbackup

Now delete and recreate the email account from cpanel as according to your requirement if emails are successfully copied after that restore the emails under newly created E-mail account.

cd /home/cPanel-user/mail/your-domain-name.com/emailbackup
cp * ../new-e-mail-account -pR

Type “yes” if want to replace.

Check all the e-mails would exist under the new E-mail accounts.

Leave a Reply