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.

Restoring a legacy backup for one user?

Discussion in 'E-mail Discussions' started by peter-wetink, Dec 16, 2013.

  1. peter-wetink

    peter-wetink Member

    Joined:
    Dec 16, 2013
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi all, I am a little new to this so please be gentle :)

    I have recently had a user accidentally delete all of her mail apart from around 30 unread messages from her inbox.

    I didn't set our WHM server up but have discovered that it is using the legacy backup system, I pulled all of the emails out of her monthly personal folder (/home/backup/cpbackup/monthly/account name/homedir/mail/domain/email account) and FTP'd them to my local machine.

    I know that all of the mails are stored in the /cur folder but these files are named in a VERY different way to those that are in her live inbox; for instance:

    Live server file name
    102EGN~O

    Backup file name
    1314785483.H165746P19453.servername.co.uk,S=23635/2,Sb

    Am I OK just to merge the folders (only adding new or files with different file names) or do I have do something to else to put the old emails into her inbox?

    Thanks in advance
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    The format used in the file names from the backup archive look like the standard format used with maildir. Assuming you are not using a custom mail server, you can restore those files to the appropriate directory. You may also want to run the following command after moving the files:

    Code:
    /scripts/mailperm $username
    Thank you.
     
  3. peter-wetink

    peter-wetink Member

    Joined:
    Dec 16, 2013
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Michael,

    For my total clarification when you say "restore" do you mean I can just FTP these files into her personal folder? I don't have to use any functionality of WHM to do so? I won't end up with duplicate mail or anything if I do so?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    648
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Yes, you can upload the individual emails to the appropriate directory. Any files that already exist should prompt you with an overwrite notice.

    Thank you.
     
  5. peter-wetink

    peter-wetink Member

    Joined:
    Dec 16, 2013
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks Michael.

    I have copied the backup onto the server but have discovered a bit of a problem, I know have too many levels on inbox!

    Rather than just going:
    - Inbox
    - Sent
    - Folders

    I now have
    - Inbox
    - INBOX​
    - INBOX​
    - Deleted​
    - Deleted​
    - Junk​
    - Trash​
    - Sent

    Without folders, is there anyway that I can get the folder structure back to how it used to be?

    I ran the mailperm script as you said but it didn't flag anything up or make any sign this was an issue.
     
Loading...

Share This Page