The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Restore an Email Account Only

Discussion in 'E-mail Discussions' started by PCZero, Jan 23, 2015.

  1. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    This may be a bit of a weird request but I have a need to restore JUST an email account for one of my clients. I have daily .gz files here locally and my objective it to basically have the account on the server set do that there is no record of the email account in question and have a process that will recreate the email account completely. Specifically I want the restore to recreate the user@domain.com mail box using the backed up password and then restore all of the actual backed up email. How feasible is this?
     
  2. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    I'll read that Michael. I did find a way to accomplish what I wanted. As soon as I read the other thread I'll come back here to post my method.

    - - - Updated - - -

    Michael here is my fix. Feel free to offer me any feedback/comments/opinions as to how valid this method is...

    I needed to restore an email account and I did not want the client to have to go through the process of recreating the accounts and PWs. Since I have daily off site back ups, I was able to do the following...

    1) Extract the etc and mail from the tarball of the user's backup.
    2) Upload there two directories to the user's home directory.
    3) SSH into the server and go to the user's home directory.
    4) Issue the following commands.

    cp --force -r _restore_mail/etc/ ./
    cp --force -r _restore_mail/mail/ ./
    chown -R ACCOUNT_NAME:ACCOUNT_NAME etc
    chown -R ACCOUNT_NAME:ACCOUNT_NAME mail
    rm -rf _restore_mail

    5) Run WHM - Email - Repair Mailbox Permissions


    This worked for all of the accounts I needed to restore just fine. It rebuilt the accounts with the existing passwords and retained any email that was on the server.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. PCZero

    PCZero Well-Known Member

    Joined:
    Dec 13, 2003
    Messages:
    526
    Likes Received:
    34
    Trophy Points:
    28
    Location:
    Earth
    Woo Hoo I actually got one right for a change! I think I will go have a bag of cookies...
     
Loading...

Share This Page