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