.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "RECONSTRUCT" "8" "Mar 18, 2024" "3.10.0" "Cyrus IMAP" .SH NAME reconstruct \- Cyrus IMAP documentation .sp Reconstruct mailboxes .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBreconstruct\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-p\fP \fIpartition\fP ] [ \fB\-x\fP ] [ \fB\-r\fP ] [ \fB\-f\fP ] [ \fB\-U\fP ] [ \fB\-s\fP ] [ \fB\-q\fP ] [ \fB\-G\fP ] [ \fB\-R\fP ] [ \fB\-o\fP ] [ \fB\-O\fP ] [ \fB\-M\fP ] \fImailbox\fP\&... \fBreconstruct\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-p\fP \fIpartition\fP ] [ \fB\-x\fP ] [ \fB\-r\fP ] [ \fB\-f\fP ] [ \fB\-U\fP ] [ \fB\-s\fP ] [ \fB\-q\fP ] [ \fB\-G\fP ] [ \fB\-R\fP ] [ \fB\-o\fP ] [ \fB\-O\fP ] [ \fB\-M\fP ] \fB\-u\fP \fIuser\fP\&... \fBreconstruct\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-p\fP \fIpartition\fP ] [ \fB\-r\fP ] [ \fB\-q\fP ] \fB\-V\fP \fIversion\fP \fImailbox\fP\&... \fBreconstruct\fP [ \fB\-C\fP \fIconfig\-file\fP ] [ \fB\-p\fP \fIpartition\fP ] [ \fB\-r\fP ] [ \fB\-q\fP ] \fB\-V\fP \fIversion\fP \fB\-u\fP \fIuser\fP\&... \fBreconstruct\fP [ \fB\-C\fP \fIconfig\-file\fP ] \fB\-P\fP \fIcyrus\-header\-paths\fP\&... .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp \fBreconstruct\fP rebuilds one or more IMAP mailboxes. It can be used to recover from almost any sort of data corruption. .sp If \fBreconstruct\fP 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 \fBreconstruct\fP attempts to preserve includes the flag names, flag state, and internaldate. .sp \fBreconstruct\fP derives all other information from the message files. .sp \fBreconstruct\fP reads its configuration options out of the \fI\%imapd.conf(5)\fP file unless specified otherwise by \fB\-C\fP\&. Any mailbox directory underneath the path specified in the \fBpartition\-news\fP configuration option is assumed to be in news format. .sp \fBreconstruct\fP does not adjust the quota usage recorded in any quota root files. After running \fBreconstruct\fP, it is advisable to run \fBquota(8)\fP with the \fB\-f\fP switch in order to fix the quota root files. .sp When upgrading versions of Cyrus software, it may be necessary to run \fBreconstruct\fP with the \fB\-V\fP option, to rebuild indexes to a given version (or \fImax\fP for the most recent). Note that the \fB\-V\fP option cannot be combined with most other reconstruct options. If a mailbox needs reconstructing you should do that first, and then upgrade it with \fB\-V\fP once it\(aqs good. .SH OPTIONS .INDENT 0.0 .TP .B \-C config\-file Use the specified configuration file \fIconfig\-file\fP rather than the default \fI\%imapd.conf(5)\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-p partition, \-\-partition=partition Search for the listed (non\-existant) mailboxes on the indicated \fIpartition\fP\&. Create the mailboxes in the database in addition to reconstructing them. (not compatible with the use of wildcards) .UNINDENT .INDENT 0.0 .TP .B \-x, \-\-ignore\-disk\-metadata When processing a mailbox which is not in the mailbox list (e.g. via the \fB\-p\fP or \fB\-f\fP options), do not import the metadata from the mailbox, instead create it anew (this specifically affects at least the mailbox\(aqs seen state unique identifier, user flags, and ACL). .UNINDENT .INDENT 0.0 .TP .B \-r, \-\-recursive Recursively reconstruct all sub\-mailboxes of the mailboxes or mailbox prefixes given as arguments. .UNINDENT .INDENT 0.0 .TP .B \-f, \-\-scan\-filesystem Examine the filesystem underneath mailbox, adding all directories with a \fBcyrus.header\fP found there as new mailboxes. Useful for restoring mailboxes from backups. .UNINDENT .INDENT 0.0 .TP .B \-s, \-\-no\-stat Don\(aqt stat underlying files. This makes reconstruct run faster, at the expense of not noticing some issues (like zero byte files or size mismatches). \(dq\fBreconstruct \-s\fP\(dq should be quite fast. .UNINDENT .INDENT 0.0 .TP .B \-q, \-\-quiet Emit less verbose information to syslog. .UNINDENT .INDENT 0.0 .TP .B \-n, \-\-dry\-run Don\(aqt make any changes. Problems are reported, but not fixed. .UNINDENT .INDENT 0.0 .TP .B \-G, \-\-force\-reparse Force re\-parsing of the underlying message (checks GUID correctness). Reconstruct with \-G should fix all possible individual message issues, including corrupted data files. .UNINDENT .INDENT 0.0 .TP .B \-I, \-\-update\-uniqueids If two mailboxes exist with the same UNIQUEID and reconstruct visits both of them, \-I will cause the second mailbox to have a new UNIQUEID created for it. If you don\(aqt specify \-I, you will just get a syslog entry telling you of the clash. .UNINDENT .INDENT 0.0 .TP .B \-R, \-\-guid\-mismatch\-keep 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\(aqre happy to be served the missing files. .UNINDENT .INDENT 0.0 .TP .B \-U, \-\-guid\-mismatch\-discard 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. .sp WARNING: this deletes corrupt message files for ever \- so make sure you\(aqve exhausted other options first! .UNINDENT .INDENT 0.0 .TP .B \-o, \-\-ignore\-odd\-files Ignore odd files in your mailbox disk directories, instead of complaining about them. Probably useful if you are using some tool which adds additional tracking files. .UNINDENT .INDENT 0.0 .TP .B \-O, \-\-delete\-odd\-files Delete odd files. This is the opposite of \fB\-o\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-M, \-\-prefer\-mboxlist Prefer mailboxes.db over cyrus.header \- will rewrite ACL or uniqueid from the mailboxes.db into the header file rather than the other way around. This feature was introduced in version 3.0. .UNINDENT .INDENT 0.0 .TP .B \-V version, \-\-set\-version=version Change the \fBcyrus.index\fP minor version to a specific \fIversion\fP\&. This can be useful for upgrades or downgrades. Use a magical version of \fImax\fP to upgrade to the latest available database format version. .UNINDENT .INDENT 0.0 .TP .B \-u, \-\-userids Instead of mailbox prefixes, give userids on the command line .UNINDENT .INDENT 0.0 .TP .B \-P, \-\-header\-paths Instead of mailbox prefixes, give paths to cyrus.header files on the command line. The paths can be mailbox directories, or explicit cyrus.header filenames. This will ONLY create/repair mailboxes.db records using data in cyrus.header and cyrus.index. .UNINDENT .SH EXAMPLES .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBreconstruct \-r \-f\fP \fItech.support\fP .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Recursively reconstruct all mailboxes within the \fItech.support\fP hierarchy, restoring any directories containing \fBcyrus.header\fP files. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBreconstruct \-r \-f\fP \fItech.support.Archive.2%\fP .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Recursively reconstruct all mailboxes within the \fItech.support.Archive\fP hierarchy with names beginning with \(aq2\(aq, restoring any directories containing \fBcyrus.header\fP files. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \fBreconstruct \-r \-f \-u\fP \fIjsmith\fP .ft P .fi .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 Recursively reconstruct all mailboxes belonging to \fIjsmith\fP, restoring any directories containing \fBcyrus.header\fP files. .UNINDENT .UNINDENT .SH HISTORY .sp The options \fB\-k\fP (keep flags) and \fB\-g\fP (clear GUID) have been deprecated in Cyrus version 2.4. .sp The \fB\-u\fP and \fB\-V\fP options were added in Cyrus version 2.5. .sp The \fB\-M\fP option was added in Cyrus version 3.0. .SH FILES .sp /etc/imapd.conf .SH SEE ALSO .sp \fI\%imapd.conf(5)\fP .SH AUTHOR The Cyrus Team, Nic Bernstein (Onlight) .SH COPYRIGHT 1993–2024, The Cyrus Team .\" Generated by docutils manpage writer. .