1RECONSTRUCT(8)              System Manager's Manual             RECONSTRUCT(8)
2
3
4
5 *
6

NAME

8       reconstruct - reconstruct mailboxes
9

SYNOPSIS

11       reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ] [ -f ]
12                   [ -k ] [ -s ] [ -g ] [ -G ] [ -R ] [ -o ] [ -O ] mailbox...
13       reconstruct [ -C config-file ] -m
14

DESCRIPTION

16       Reconstruct rebuilds one or more IMAP mailboxes.  When invoked with the
17       -m switch, it rebuilds the master mailboxes file.  It can  be  used  to
18       recover from almost any sort of data corruption.
19
20       If Reconstruct can find existing header and index files, it attempts to
21       preserve any data in them that is not derivable from the message  files
22       themselves.   The  state  reconstruct attempts to preserve includes the
23       flag names, flag state,  and  internaldate.   Reconstruct  derives  all
24       other information from the message files.
25
26       Reconstruct  reads  its  configuration options out of the imapd.conf(5)
27       file unless specified otherwise by -C.  Any  mailbox  directory  under‐
28       neath  the path specified in the partition-news configuration option is
29       assumed to be in news format.
30
31       Reconstruct does not adjust the quota usage recorded in any quota  root
32       files.  After running reconstruct, it is advisable to run quota(8) with
33       the -f switch in order to fix the quota root files.
34

OPTIONS

36       -C config-file
37              Read configuration options from config-file.
38
39       -p partition
40              Search for the listed (non-existant) mailboxes on the  indicated
41              partition.   Create the mailboxes in the database in addition to
42              reconstructing them.  (not compatible with the use of wildcards)
43
44       -x     When processing a mailbox which is not in the mailbox list (e.g.
45              via  the  -p or -f options), do not import the metadata from the
46              mailbox, instead create it anew (this  specifically  affects  at
47              least  the  mailbox's  seen state unique identifier, user flags,
48              and ACL).
49
50       -r     Recursively reconstruct all sub-mailboxes of  the  mailboxes  or
51              mailbox prefixes given as arguments.
52
53       -f     Examine  the  filesystem underneath mailbox, adding all directo‐
54              ries with a cyrus.header found there as new  mailboxes.   Useful
55              for restoring mailboxes from backups.
56
57       -s     Don't stat underlying files.  This makes reconstruct run faster,
58              at the expense of not noticing some issues (like zero byte files
59              or size mistmatches).  "reconstruct -s" should be quite fast.
60
61       -n     Don't  make  any  changes.   This  gives equivalent behaviour to
62              chk_cyrus where problems are reported, but not fixed.
63
64       -G     Force re-parsing of the underlying message (checks GUID correct‐
65              ness).   Reconstruct  with -G should fix all possible individual
66              message issues, including corrupted data files.
67
68       -R     Perform a UID upgrade operation on  GUID  mismatch  files.   Use
69              this  option  if  you  think your index is corrupted rather than
70              your message files, or if all backup attempts  have  failed  and
71              you're happy to be served the missing files.
72
73       -U     Use  this option if you have corrupt message files in your spool
74              and have been unable to restore them  from  backup.   This  will
75              make the mailbox IOERROR free and fix replication.  WARNING this
76              deletes corrupt message files for ever -  so  make  sure  you've
77              exhausted other options first!
78
79       -o     Ignore  odd  files  in  your mailbox disk directories.  Probably
80              useful if you are using some tool which adds additional tracking
81              files.
82
83       -O     Delete odd files.  This is the opposite of '-o'.
84
85       -m     NOTE: CURRENTLY UNAVAILABLE
86              Rebuild  the  mailboxes file.  Use whatever data in the existing
87              mailboxes file it can scavenge, then scans all partitions listed
88              in the imapd.conf(5) file for additional mailboxes.
89

EXAMPLES

91       You  want to reconstruct the index files for a user, you have recovered
92       a deleted mail file from backup  and  given  it  a  suitable  name  (eg
93       user/ben-lacy/33.), but it is not visible since it is not indexed:
94
95       reconstruct -r user.ben-lacy
96
97       If  you have the unixhierarchysep:yes option set in /etc/imapd.conf you
98       would need to run:
99
100       reconstruct -r user/ben.lacy
101
102

FILES

104       /etc/imapd.conf
105
106
107
108CMU                              Project Cyrus                  RECONSTRUCT(8)
Impressum