PMDF popstore & MessageStore Manager's Guide


Previous Contents Index

2.5.4 Reconstruct Utility

The MessageStore comes with a "reconstruct" utility to be used in the event of a disk corruption. The reconstruct utility rebuilds the index and cache files the MessageStore uses to support the IMAP protocol. In addition, if an individual user is restored from backup, the reconstruct utility can be used to re-integrate that user's mailboxes into the MessageStore.

Note

There must be no IMAP clients connected to a mailbox while it is being reconstructed.

The reconstruct utility is available as a command within the MessageStore command-line management utility. There are three ways to use it:

  1. Reconstruct index and cache files for one or more individual mailboxes. This is necessary if a mailbox got corrupted (perhaps due to a power failure in the middle of a delivery or expunge). It is also necessary to reconstruct a mailbox after restore from backup, since the backup utility could also snapshot the mailbox in the middle of a delivery or expunge operation. For this usage, no switches are provided; the mailboxes are simply listed:


    msgstore> reconstruct mailbox-name-1 [mailbox-name-2 ...] 
    
    Note that the MessageStore does not support messages with NUL bytes. In normal operation, PMDF will strip or downconvert such bytes prior to final delivery. However, in the event such a message is detected during the reconstruct process, BAD will be appended to the name of the message file and the message will be ignored.

  2. Reconstruct index and cache files for one or more subtrees of mailboxes. This works much like (1), except it reconstructs the mailbox and all subfolders listed in the mailbox list. The -recurse or -r switch is used to specify this behavior. If no mailbox names are provided, then all mailboxes in the mailbox list will be reconstructed.


    msgstore> reconstruct -r [mailbox-name-1 [mailbox-name-2...]] 
    

  3. Reconstruct the mailbox list. The mailbox list is used by the MessageStore to locate mailboxes and to provide fast responses to IMAP LIST commands. This is necessary if the mailbox list got corrupted (perhaps due to a disk error or software defect), or to re-integrate a restored mailbox which was previously deleted. Note that while the reconstruct mailbox list command is running, users will be unable to create, delete or rename mailboxes through IMAP. The -mailbox_list or -m switch is used to specify this behavior.


    msgstore> reconstruct -m
    
    Note that this command uses the user database to determine the list of users to reconstruct, so in the event that database is corrupted, the x-build-user-db command must be used first.

The name of a user's INBOX in the MessageStore is


Other Users/user 
and their personal folders are one level below that. Thus if the user joe creates the folder stuff , the full name for that folder would be


Other Users/joe/stuff 
Since these names contain spaces, it will be necessary to enclose the mailbox names in double quotes. As a convenience, the reconstruct utility will prepend "Other Users/" to any mailbox name argument which does not already begin with "Other Users/" or "Public Folders/".


Previous Next Contents Index