Hello all, I am a new poster here.
I would like to know about the possibility/process of restoring the emails and attachments for a single email account from a cPanel full website backup .
The scenario is that a user deletes all their emails and attachments AND empties the trash folder.
There is a previous cPanel full website backup that has been downloaded and extracted to a localmachine/server to recreate the site files, including all email accounts. The local machine can connect to the hosting site with winSCP access to the webhost with a dual panel interface to directories on both systems.
All hidden files are listed on both systems
The question is whether replacing the whole directory FROM the backup (overwriting with backup replaced files mode on) on:
BACKUP_ON_localmachine/homedir/mail/website_name.com/account_to_restore
over winSCP TO:
HOST/homedir/mail/website_name.com/account_to_restore
will actually restore the emails and attachments to the account?
Though it appears that the logs for the individual account_to_restore are all located in the account_to_restore directory, are there other logs or files in other directories that are required for a restore of just the emails/attachments? I am not trying to delete or recreate the account, and no filenames or passwords are changed.
The only references I seem to find in a search of the email forums relates to copying specific emails to an account.
24x7server, April 17 2013:
The second response seems to indicate that copying the directory to restore the emails would work, but does not refer to the hidden files in the directory.
Do I specifically need to use rsync for this process or is a manual move with winSCP sufficient?
I appreciate any and all input here.
Thank you very much in advance for helping me understand the process.
I would like to know about the possibility/process of restoring the emails and attachments for a single email account from a cPanel full website backup .
The scenario is that a user deletes all their emails and attachments AND empties the trash folder.
There is a previous cPanel full website backup that has been downloaded and extracted to a localmachine/server to recreate the site files, including all email accounts. The local machine can connect to the hosting site with winSCP access to the webhost with a dual panel interface to directories on both systems.
All hidden files are listed on both systems
The question is whether replacing the whole directory FROM the backup (overwriting with backup replaced files mode on) on:
BACKUP_ON_localmachine/homedir/mail/website_name.com/account_to_restore
over winSCP TO:
HOST/homedir/mail/website_name.com/account_to_restore
will actually restore the emails and attachments to the account?
Though it appears that the logs for the individual account_to_restore are all located in the account_to_restore directory, are there other logs or files in other directories that are required for a restore of just the emails/attachments? I am not trying to delete or recreate the account, and no filenames or passwords are changed.
The only references I seem to find in a search of the email forums relates to copying specific emails to an account.
CPanelMichael, April 11, 2011:
You can find the backup archive from the backup generation date of your choosing, and then manually extract the email contents from the archive (e.g. using the "tar --extract" functionality). The email data is stored in:
/home/$username/mail/$domain/$email-account-name
Copying over the extracted data to it's associated directory will not overwrite the new emails that have since generated in the directory, as each email has a unique name.
Thank you.
You can find the backup archive from the backup generation date of your choosing, and then manually extract the email contents from the archive (e.g. using the "tar --extract" functionality). The email data is stored in:
/home/$username/mail/$domain/$email-account-name
Copying over the extracted data to it's associated directory will not overwrite the new emails that have since generated in the directory, as each email has a unique name.
Thank you.
24x7server, April 17 2013:
Hello
,
You have root access of your server so you can restore your mail account sub folder through command line.
If you have backup in .tar.gz format, then first of all you will have to extract that backup file and rsync your directory which you want to restore from backup to user mail directory.

You have root access of your server so you can restore your mail account sub folder through command line.
If you have backup in .tar.gz format, then first of all you will have to extract that backup file and rsync your directory which you want to restore from backup to user mail directory.
The second response seems to indicate that copying the directory to restore the emails would work, but does not refer to the hidden files in the directory.
Do I specifically need to use rsync for this process or is a manual move with winSCP sufficient?
I appreciate any and all input here.
Thank you very much in advance for helping me understand the process.