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.

Conversion to mdbox

Discussion in 'E-mail Discussions' started by fonginator, Nov 10, 2016.

Tags:
  1. fonginator

    fonginator Registered

    Joined:
    Oct 19, 2016
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    76
    Location:
    Montreal, Canada
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm taking baby steps to convert my mailboxes from Maildir to mdbox in 11.60. One account conversion seems to have gone off without a hitch but I've got questions.

    - I chose to keep the old mailbox files; however, since the conversion seems to be OK, how do I get rid of these files? Do I just delete the "storage" directories that were created in the mail directory?

    - What do we have to know about creating and restoring from backups now? With Maildir, it was just a matter of restoring files to the mail directories, but what about with mdbox?

    - How concerned should I be about corrupted indexes and the like? My understanding is that the indexes hold all of the important metadata (flags, message status), and that losing the index effectively loses all of that. Does the risk of losing email increase with mdbox?

    Thanks for any help here!

    Any help here? I've got a few gigs worth of old emails that are eating up too much space and I really need to clear them out.
     
    #1 fonginator, Nov 10, 2016
    Last edited by a moderator: Nov 14, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,022
    Likes Received:
    1,276
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @fonginator,

    The "--delete-old-format" flag is available as part of the conversion scripts to ensure the old files are removed after a successful conversion. It's documented at:

    The Mailbox Format Conversion Scripts - Documentation - cPanel Documentation

    There's no native feature that will allow you to restore emails directly, but we have a feature request open that I encourage you to vote for at:

    Adjust restore account to use dsync

    However, aside from an official feature, you can use the dsync utility manually from the command line. Here's an example:

    Code:
    dsync mirror -u user1 'mdbox:/path/to/backup/cpuser1/homedir/mail'
    dsync mirror -u user1@domain.tld 'mdbox:/path/to/backup/cpuser1/homedir/mail/domain.tld/user1'
    It's true that you may lose emails due to corruption if the system does not have backups (or emails are delivered after the most recent backup generation), but the amount of emails lost would depend entirely on the level of corruption. That said, we've not seen any issue with corruption in testing thus far.

    Thank you.
     
  3. screege

    screege Well-Known Member

    Joined:
    Aug 11, 2004
    Messages:
    187
    Likes Received:
    0
    Trophy Points:
    166
    Hello I did not did the conversion thru cli instead directly from whm where are the backups stored so I can delete them?

    Also I presume that if we make daily backups of our accounts there is no trouble in restoring everything from cpbackup?

    Regards
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,022
    Likes Received:
    1,276
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Did you choose "Keep old mailbox files. This option maintains the old files in case of an error. You must remove these files manually." when converting the mailboxes via WHM? If so, here's a quote from our Mailbox Conversion document explaining where this data is stored:

    We've not seen any issues with corruption, but you are correct that backups would include the emails (though you could lose any emails delivered between the time the most recent backup finishes and when the corruption begins).

    Thank you.
     
Loading...

Share This Page