reconstruct.8   [plain text]


.\" -*- nroff -*-
.TH RECONSTRUCT 8 "Project Cyrus" CMU
.\" 
.\" Copyright (c) 1998-2000 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 other legal
.\"    details, please contact  
.\"      Office of Technology Transfer
.\"      Carnegie Mellon University
.\"      5000 Forbes Avenue
.\"      Pittsburgh, PA  15213-3890
.\"      (412) 268-4387, fax: (412) 268-7395
.\"      tech-transfer@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.5 2005/03/05 00:37:27 dasenbro 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
]
.IR mailbox ...
.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 atleast the mailbox's seen
stat 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 \-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