1RECONSTRUCT(8) Cyrus IMAP RECONSTRUCT(8)
2
3
4
6 reconstruct - Cyrus IMAP documentation
7
8 Reconstruct mailboxes
9
11 reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ]
12 [ -f ] [ -U ] [ -s ] [ -q ] [ -G ] [ -R ] [ -o ]
13 [ -O ] [ -M ] mailbox...
14
15 reconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ]
16 [ -f ] [ -U ] [ -s ] [ -q ] [ -G ] [ -R ] [ -o ]
17 [ -O ] [ -M ] [ -u ] users...
18
19 reconstruct [ -C config-file ] -m
20
22 reconstruct rebuilds one or more IMAP mailboxes. When invoked with the
23 -m switch, it rebuilds the master mailboxes file. It can be used to
24 recover from almost any sort of data corruption.
25
26 If reconstruct can find existing header and index files, it attempts to
27 preserve any data in them that is not derivable from the message files
28 themselves. The state reconstruct attempts to preserve includes the
29 flag names, flag state, and internaldate.
30
31 reconstruct derives all other information from the message files.
32
33 reconstruct reads its configuration options out of the imapd.conf(5)
34 file unless specified otherwise by -C. Any mailbox directory under‐
35 neath the path specified in the partition-news configuration option is
36 assumed to be in news format.
37
38 reconstruct does not adjust the quota usage recorded in any quota root
39 files. After running reconstruct, it is advisable to run quota(8) with
40 the -f switch in order to fix the quota root files.
41
43 -C config-file
44 Use the specified configuration file config-file rather than the
45 default imapd.conf(5).
46
47 -p partition
48 Search for the listed (non-existant) mailboxes on the indicated
49 partition. Create the mailboxes in the database in addition to
50 reconstructing them. (not compatible with the use of wildcards)
51
52 -x When processing a mailbox which is not in the mailbox list (e.g.
53 via the -p or -f options), do not import the metadata from the
54 mailbox, instead create it anew (this specifically affects at
55 least the mailbox's seen state unique identifier, user flags,
56 and ACL).
57
58 -r Recursively reconstruct all sub-mailboxes of the mailboxes or
59 mailbox prefixes given as arguments.
60
61 -f Examine the filesystem underneath mailbox, adding all directo‐
62 ries with a cyrus.header found there as new mailboxes. Useful
63 for restoring mailboxes from backups.
64
65 -s Don't stat underlying files. This makes reconstruct run faster,
66 at the expense of not noticing some issues (like zero byte files
67 or size mistmatches). "reconstruct -s" should be quite fast.
68
69 -q Emit less verbose information to syslog.
70
71 -n Don't make any changes. This gives equivalent behaviour to
72 chk_cyrus(8) where problems are reported, but not fixed.
73
74 -G Force re-parsing of the underlying message (checks GUID correct‐
75 ness). Reconstruct with -G should fix all possible individual
76 message issues, including corrupted data files.
77
78 -I If two mailboxes exist with the same UNIQUEID and reconstruct
79 visits both of them, -I will cause the second mailbox to have a
80 new UNIQUEID created for it. If you don't specify -I, you will
81 just get a syslog entry telling you of the clash.
82
83 -R Perform a UID upgrade operation on GUID mismatch files. Use
84 this option if you think your index is corrupted rather than
85 your message files, or if all backup attempts have failed and
86 you're happy to be served the missing files.
87
88 -U Use this option if you have corrupt message files in your spool
89 and have been unable to restore them from backup. This will
90 make the mailbox IOERROR free and fix replication.
91
92 WARNING: this deletes corrupt message files for ever - so make
93 sure you've exhausted other options first!
94
95 -o Ignore odd files in your mailbox disk directories. Probably
96 useful if you are using some tool which adds additional tracking
97 files.
98
99 -O Delete odd files. This is the opposite of -o.
100
101 -M Prefer mailboxes.db over cyrus.header - will rewrite ACL or
102 uniqueid from the mailboxes.db into the header file rather than
103 the other way around. This feature was introduced in version
104 3.0.
105
106 -V version
107 Change the cyrus.index minor version to a specific version.
108 This can be useful for upgrades or downgrades. Use a magical
109 version of max to upgrade to the latest available database for‐
110 mat version.
111
112 -u Instead of mailbox prefixes, give usernames on the command line
113
114 -m NOTE: CURRENTLY UNAVAILABLE
115
116 Rebuild the mailboxes file. Use whatever data in the existing
117 mailboxes file it can scavenge, then scans all partitions listed
118 in the imapd.conf(5) file for additional mailboxes.
119
121 reconstruct -r -f tech.support
122 Recursively reconstruct all mailboxes within the tech.support hier‐
123 archy, restoring any directories containing cyrus.header files.
124
125 reconstruct -r -f tech.support.Archive.2%
126 Recursively reconstruct all mailboxes within the tech.support.Ar‐
127 chive hierarchy with names begining with '2', restoring any directo‐
128 ries containing cyrus.header files.
129
130 reconstruct -r -f -u jsmith
131 Recusively reconstruct all mailboxes belonging to jsmith, restoring
132 any directories containing cyrus.header files.
133
135 The options -k (keep flags) and -g (clear GUID) have been deprecated in
136 Cyrus version 2.4.
137
138 The -u and -V options were added in Cyrus version 2.5.
139
140 The -M option was added in Cyrus version 3.0.
141
143 /etc/imapd.conf
144
146 imapd.conf(5)
147
149 The Cyrus Team, Nic Bernstein (Onlight)
150
152 1993-2017, The Cyrus Team
153
154
155
156
1573.0.7 May 18, 2018 RECONSTRUCT(8)