Backup and restore Email Accounts

MarkBoshara

Registered
May 2, 2018
3
0
1
Egypt
cPanel Access Level
Reseller Owner
I have a problem. I moved my site from server to server and took a full backup and I have restored the complete data and the site is working now and but I have a problem with the emails. How do I make it work with the new server and how to retrieve the sent and receiving emails from all the emails from the backup file how Set up on Cpanel

Thanks Alot
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hello,


Restoring from a cPmove file or a backup from a cPanel server mail should have automatically been restored unless it was excluded from the backup. Are the email accounts present or is the issue that you're unable to send/receive mail?


Thank you,
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @MarkBoshara

When you go to cPanel>>Email>>Email Accounts -> Access Webmail for an existing account are you not seeing the email that was on the server previously here?

Did the MX records for your mail point to the previous server you were on or did you host mail remotely?

Thank you,
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hello,


A full backup of your site should include email. If it did not and you have access to the server you can create a full backup through cPanel by going to cPanel>>Files>>BackupWizard and create a full backup or a Home Directory + Email Forwarders and Filters backup.

Please see our documentation on this here: Backup for cPanel - Version 68 Documentation - cPanel Documentation

Thank you,
 

ebe

Member
Jul 6, 2006
17
1
153
Hello

I made a full backup/restore.
All mails files an cur/new/tmp folders are misssing from the backup file, but in List Email Accounts disk space is reported as been used
Example: 193.66 MB / 1 GB / 18.91%.

As is expected when i logon on Roundcube, the inbox is empty . The full backup do not store the mails also ?
 
Last edited:

ebe

Member
Jul 6, 2006
17
1
153
Hello Lauren
For example in the server I have: /mail/mywebdomain.com/office/
/cur/ and /new/

But in the backup file they are missing. See picture attached server<> fullbackup file
 

Attachments

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Is there an exclude file? If I take a backup of my cPanel account (full backup) through cPanel it includes the items listed here: Backup Tarball Contents | cPanel & WHM Documentation

This includes (which I just confirmed the folders in webmail include cur new and tmp

Code:
[[email protected] lauren]# ls -lah
total 21M
drwxr-x--x 14 lauren lauren 4.0K Jun 17 00:13 .
drwxr-x--x  6 lauren lauren 4.0K Jan 28 16:10 ..
drwxr-x--x  5 lauren lauren 4.0K Jun 15 17:10 .Archive
drwxr-x--x  2 lauren lauren 1.6M Jun 17 00:13 cur
-rw-r-----  1 lauren lauren    0 Nov 12  2018 dovecot-acl-list
-rw-r-----  1 lauren lauren 339K Jun 16 23:56 dovecot.index
-rw-r-----  1 lauren lauren  19M Jun 17 00:12 dovecot.index.cache
-rw-r-----  1 lauren lauren  12K Jun 17 00:13 dovecot.index.log
-rw-r-----  1 lauren lauren  33K Jun 16 23:26 dovecot.index.log.2
-rw-r-----  1 lauren lauren 1.1K Jun 15 17:13 dovecot.list.index
-rw-r-----  1 lauren lauren   72 Jun 15 17:23 dovecot.list.index.log
-rw-r-----  1 lauren lauren  336 Apr  1 14:21 dovecot.mailbox.log
-rw-r-----  1 lauren lauren   55 Jun 17 00:12 dovecot-quota
-rw-r-----  1 lauren lauren 809K Jun 17 00:12 dovecot-uidlist
-rw-r-----  1 lauren lauren    8 Apr  1 14:21 dovecot-uidvalidity
-r--r--r--  1 lauren lauren    0 Nov 12  2018 dovecot-uidvalidity.5be9a905
drwxr-x--x  5 lauren lauren 4.0K Jun  3 18:53 .Drafts
drwxr-x--x  5 lauren lauren 4.0K Jun  3 18:53 .Junk
drwxr-x--x  9 lauren lauren 4.0K Mar 12  2019 mailboxes
-rw-r-----  1 lauren lauren    7 Apr 16  2019 mailbox_format.cpanel
-rw-r-----  1 lauren lauren    0 Apr 16  2019 maildirfolder
-rw-------  1 lauren lauren  828 Jun 17 00:12 maildirsize
drwxr-x--x  2 lauren lauren 4.0K Jun 17 00:13 new
drwxr-x--x  5 lauren lauren 4.0K Jun  3 16:53 .Sent
drwxr-x--x  5 lauren lauren 4.0K Jun  1 10:22 .spam
drwxr-x--x  2 lauren lauren 4.0K Apr 16  2019 storage
-rw-r-----  1 lauren lauren   23 Feb 28 16:28 subscriptions
drwxr-x--x  5 lauren lauren 4.0K Jun  1 10:23 .test
drwxr-x--x  2 lauren lauren 4.0K Jun 17 00:12 tmp
drwxr-x--x  5 lauren lauren 4.0K Nov  3  2019 .Trash
[[email protected] lauren]# pwd
/home/lauren/backup-6.17.2020_00-11-50_lauren/homedir/mail/mydomain.us/lauren
 
  • Wow
Reactions: ebe

ebe

Member
Jul 6, 2006
17
1
153
yes . Im retard :)

my /etc/cpbackup-exclude.conf file contain:

mail/*/*/.Junk
mail/*/*/.Sent
mail/*/*/.Trash
mail/*/*/cur
mail/*/*/new

Aparently the change was not documented back in 2015 when the change was made.

Case closed. Thank you for the pleasant conversation :)