Codebase list cyrus-imapd / debian/2.4.13-1 man / reconstruct.8
debian/2.4.13-1

Tree @debian/2.4.13-1 (Download .tar.gz)

reconstruct.8 @debian/2.4.13-1raw · history · blame

.\" -*- nroff -*-
.TH RECONSTRUCT 8 "Project Cyrus" CMU
.\"
.\" Copyright (c) 1994-2008 Carnegie Mellon University.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\"
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\"
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in
.\"    the documentation and/or other materials provided with the
.\"    distribution.
.\"
.\" 3. The name "Carnegie Mellon University" must not be used to
.\"    endorse or promote products derived from this software without
.\"    prior written permission. For permission or any legal
.\"    details, please contact
.\"      Carnegie Mellon University
.\"      Center for Technology Transfer and Enterprise Creation
.\"      4615 Forbes Avenue
.\"      Suite 302
.\"      Pittsburgh, PA  15213
.\"      (412) 268-7393, fax: (412) 268-7395
.\"      innovation@andrew.cmu.edu
 *
.\" 4. Redistributions of any form whatsoever must retain the following
.\"    acknowledgment:
.\"    "This product includes software developed by Computing Services
.\"     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
.\"
.\" CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
.\" THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
.\" AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
.\" FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
.\" AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.\" $Id: reconstruct.8,v 1.26 2010/01/06 17:01:52 murch Exp $
.SH NAME
reconstruct \- reconstruct mailboxes
.SH SYNOPSIS
.B reconstruct
[
.B \-C
.I config-file
]
[
.B \-p
.I partition
]
[
.B \-x
]
[
.B \-r
]
[
.B \-f
]
.br
            [
.B \-k  
]
[
.B \-s
]
[
.B \-g
]
[
.B \-G
]
[
.B \-R
]
[
.B \-o
]
[
.B \-O
]
.IR mailbox ...
.br
.br
.B reconstruct
[
.B \-C
.I config-file
]
.B \-m
.SH DESCRIPTION
.I Reconstruct
rebuilds one or more IMAP mailboxes.  When invoked with the
.B \-m
switch, it rebuilds the master
mailboxes file.  It can be used to recover from
almost any sort of data corruption.
.PP
If
.I Reconstruct
can find existing header and index files, it attempts to preserve any
data in them that is not derivable from the message files themselves.
The state 
.I reconstruct
attempts to preserve includes the flag names, flag state, and
internaldate.
.I Reconstruct
derives all other information from the message files.
.PP
.I Reconstruct
reads its configuration options out of the
.IR imapd.conf (5)
file unless specified otherwise by \fB-C\fR.  Any mailbox directory
underneath the path specified in the
.I partition-news
configuration option is assumed to be in news format.
.PP
.I Reconstruct
does not adjust the quota usage recorded in any quota
root files.  After running
.IR reconstruct ,
it is advisable to run
.IR quota (8)
with the
.I \-f
switch in order to fix the quota root files.
.SH OPTIONS
.TP
.BI \-C " config-file"
Read configuration options from \fIconfig-file\fR.
.TP
.BI \-p " partition"
Search for the listed (non-existant) mailboxes on the indicated partition.
Create the mailboxes in the database in addition to reconstructing them.
(not compatible with the use of wildcards)
.TP
.B \-x
When processing a mailbox which is not in the mailbox list (e.g. via
the -p or -f options), do not import the metadata from the mailbox,
instead create it anew (this specifically affects at least the mailbox's seen
state unique identifier, user flags, and ACL).
.TP
.B \-r
Recursively reconstruct all sub-mailboxes of the mailboxes or mailbox
prefixes given as arguments.
.TP
.B \-f
Examine the filesystem underneath mailbox, adding all directories with
a cyrus.header found there as new mailboxes.  Useful for
restoring mailboxes from backups.
.TP
.B \-s
Don't stat underlying files.  This makes reconstruct run faster, at
the expense of not noticing some issues (like zero byte files or
size mistmatches).  "reconstruct -s" should be quite fast.
.TP
.B \-n
Don't make any changes.  This gives equivalent behaviour to
.I chk_cyrus
where problems are reported, but not fixed.
.TP
.B \-G
Force re-parsing of the underlying message (checks GUID correctness).
Reconstruct with -G should fix all possible individual message issues,
including corrupted data files.
.TP
.B \-R
Perform a UID upgrade operation on GUID mismatch files.  Use this option
if you think your index is corrupted rather than your message files, or if
all backup attempts have failed and you're happy to be served the missing
files.
.TP
.B \-U
Use this option if you have corrupt message files in your spool and have
been unable to restore them from backup.  This will make the mailbox
IOERROR free and fix replication.
.B WARNING
this deletes corrupt message files for ever - so make sure you've exhausted
other options first!
.TP
.B -o
Ignore odd files in your mailbox disk directories.  Probably useful if you
are using some tool which adds additional tracking files.
.TP
.B -O
Delete odd files.  This is the opposite of '-o'.
.TP
.B \-m
.B NOTE: CURRENTLY UNAVAILABLE
.br
Rebuild the
.I mailboxes
file.  Use whatever data in the existing
.I mailboxes
file it can scavenge, then scans all partitions listed in the
.IR imapd.conf (5)
file for additional mailboxes.
.SH EXAMPLES
You want to reconstruct the index files for a user, you have recovered a deleted mail file from backup
and given it a suitable name (eg user/ben-lacy/33.), but it is not visible since it is not indexed:

.nf
reconstruct -r user.ben-lacy
.fi
.PP
If you have the \fBunixhierarchysep:yes\fR option set in \fB/etc/imapd.conf\fR you would need
to run:

.nf
reconstruct -r user/ben.lacy
.fi

.SH FILES
.TP
.B /etc/imapd.conf