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 emails from local backup

Discussion in 'E-mail Discussions' started by abidshahzad4u, Jun 25, 2011.

  1. abidshahzad4u

    abidshahzad4u Registered

    Joined:
    Jun 25, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi all

    I have accidentally deleted all the mails from my cur folder. Luckily I have the mail backup at my local system. Now I want to restore only the mail files from my local system backup to my website mail cur directory.

    What is the easiest way for it? Please help.

    regards
    Abid Shahzad
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You will need to upload the files within the "cur" directory from your local system to the appropriate location on the server. EX:

    Code:
    /home/username/mail/domain.com/email-account/cur
    This can be done via the transfer method of your choice (e.g. FTP, SFTP, SCP). Remember to update the ownership of the files to the account username after you upload them.

    Thank you.
     
  3. kjg

    kjg Well-Known Member

    Joined:
    Mar 2, 2004
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Hi Michael (or anyone else that knows the anser)
    I know this is a rather old thread, but since I have the same question....

    I have a number of accounts where the email folders had to be restored from old backup after some crashes.

    We were able to save all email folders from the crashed drive so we would like to just upload them to "cur" folder, but will that work?
    There are dovecot files, indexes etc. Are those updateted automatically? Or do we need to run any script after we have added the emails to the folders?

    Thank you
    // kjg
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    The email files are compatible as long as this server also uses Dovecot. You should not have to run any scripts, but the following one can be helpful sometimes when modifying mail directories to ensure permissions are correct:

    Code:
    # /scripts/mailperm username
    Thank you.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    I need to really stress the cur folder is for the latest emails that have already been read. If you have a backup of the actual cPanel mail folders, you'd want to move the contents back into the appropriate folders, so you would not upload all contents into the cur folder at /home/user/mail/domain.com/emailuser/cur location, but only the emails that were already read into that folder. The /home/user/mail/domain.com/emailuser folder would have the maildirsize and several other files and folders in it.

    Also, please note that the path /home/user/mail/domain.com/emailuser represents user as the cPanel username, domain.com as the domain name, and emailuser as the email username without the @domain.com portion.

    Thanks!
     
Loading...

Share This Page