Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Email recovery on different WHM host

Discussion in 'E-mail Discussion' started by doulos61, Dec 6, 2014.

  1. doulos61

    doulos61 Well-Known Member

    Joined:
    Dec 13, 2006
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    156
    Greetings -

    I know this can be done just trying to thinking there is someone more experienced in an effective manner in which to do it.

    A client recently deleted all their email on the server. This is for a legal firm so I was asked to make the best efforts to restore the data. Since all I have is the entire container backed up, I had to restore the backup to a different server due to space issues. I have extracted the old home folder to a location on the second server.

    My thinking is that I can create an email account on one of the hosted domains on the second server, set the permissions to the extracted email for the account that was just created, move the email data to proper mail hierarchy and then try to access the email.

    If successful at that point either I or the client can retrieve the data.

    Also, if it would suit it better, I could always compress the extracted email data, upload it to the original host, extract it there and then place it back in its original location... just a though.

    I would appreciate the input, directions or suggestions.
    Please assist
    Thanks
    Shoop
     
  2. dalem

    dalem Well-Known Member
    PartnerNOC

    Joined:
    Oct 24, 2003
    Messages:
    2,756
    Likes Received:
    87
    Trophy Points:
    353
    Location:
    SLC
    cPanel Access Level:
    DataCenter Provider
    recreate the deleted email accounts as they were & rsync the mail from the backup
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. doulos61

    doulos61 Well-Known Member

    Joined:
    Dec 13, 2006
    Messages:
    46
    Likes Received:
    0
    Trophy Points:
    156
    Would that command line basically be? -

    rsync -avHz /source/path/mailbackup/ /target/path/mail/
     
  4. MilesWeb

    MilesWeb Well-Known Member
    PartnerNOC

    Joined:
    May 23, 2012
    Messages:
    173
    Likes Received:
    2
    Trophy Points:
    68
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    If you have the backup of etc and mail folder there won't be a need to re create the email accounts. Sync these 2 folders and the data will be restored.

    As you have extracted the backup on other server the command will be as below. This command needs to be executed on the server where the backup is extracted.

    rsync -va -e "ssh -p 22" /source/path/mailbackup/etc root@server-ip:/home/cPanel-username/
    rsync -va -e "ssh -p 22" /source/path/mailbackup/mail root@server-ip:/home/cPanel-username/

    Correct the ownership & this should be it.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,233
    Likes Received:
    1,939
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    Yes, manually moving the data back into place in the "etc" and "mail" directories will restore the email accounts. Ensure you update the ownership values and run the following command:

    Code:
    /scripts/mailperm $username
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice