Skip to main content

Restoring single account emails and attachments after deletion

Comments

3 comments

  • cPanelMichael
    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.

    Hello, Yes, you can simply copy over that directory to the same location under the existing account. It's acceptable to use rsync or a SCP/SFTP client, however ensure you are logged in as the cPanel account username when copying the files. In addition, run the following command via SSH as "root" after copying over the files:
    /scripts/mailperm $cpanel-username
    Thank you.
    0
  • WiredLives
    Hello, Yes, you can simply copy over that directory to the same location under the existing account. It's acceptable to use rsync or a SCP/SFTP client, however ensure you are logged in as the cPanel account username when copying the files. In addition, run the following command via SSH as "root" after copying over the files:
    /scripts/mailperm $cpanel-username
    Thank you.

    Thank you Michael. I would never have known about the mailperm script.
    0
  • cPanelMichael
    I'm happy to see that information was helpful. Let us know if you have any trouble restoring the emails. Thanks!
    0

Please sign in to leave a comment.