| 1 |
.. cyrusman:: ctl_cyrusdb(8) |
| 2 |
|
| 3 |
.. author: Nic Bernstein (Onlight) |
| 4 |
.. author: Jeroen van Meeuwen (Kolab Systems) |
| 5 |
|
| 6 |
.. _imap-reference-manpages-systemcommands-ctl_cyrusdb: |
| 7 |
|
| 8 |
=============== |
| 9 |
**ctl_cyrusdb** |
| 10 |
=============== |
| 11 |
|
| 12 |
Perform administrative operations directly on Cyrus IMAP databases. |
| 13 |
|
| 14 |
Synopsis |
| 15 |
======== |
| 16 |
|
| 17 |
.. parsed-literal:: |
| 18 |
|
| 19 |
**ctl_cyrusdb** [ **-C** *config-file* ] **-c** |
| 20 |
**ctl_cyrusdb** [ **-C** *config-file* ] **-r** [ **-x** ] |
| 21 |
|
| 22 |
Description |
| 23 |
=========== |
| 24 |
|
| 25 |
**ctl_cyrusdb** is used to perform various administrative operations on |
| 26 |
the Cyrus IMAP databases. |
| 27 |
|
| 28 |
**ctl_cyrusdb** |default-conf-text| |
| 29 |
|def-confdir-text| Cyrus databases. |
| 30 |
|
| 31 |
Options |
| 32 |
======= |
| 33 |
|
| 34 |
.. program:: ctl_cyrusdb |
| 35 |
|
| 36 |
.. option:: -C config-file |
| 37 |
|
| 38 |
|cli-dash-c-text| |
| 39 |
|
| 40 |
.. option:: -r, --recover |
| 41 |
|
| 42 |
Recover the database after an application or system failure. Also |
| 43 |
performs database cleanups like removing mailbox reservations (and |
| 44 |
the associated mailbox files). |
| 45 |
|
| 46 |
All mailbox files are also checked to make sure the file format |
| 47 |
matches the configured database type in imapd.conf. If not, the |
| 48 |
file is automatically converted using the same logic as cvt_cyrusdb. |
| 49 |
|
| 50 |
If the ``reverseacls`` option in :cyrusman:`imapd.conf(5)` is enabled, |
| 51 |
and the RACL entries in the database are an old version or do not |
| 52 |
exist, they will be generated. Conversely, if RACL entries do exist |
| 53 |
in the database, but the ``reverseacls`` option is disabled, then the |
| 54 |
entries will be cleaned up. |
| 55 |
|
| 56 |
.. option:: -x, --no-cleanup |
| 57 |
|
| 58 |
Used with ``-r`` to only recover the database, and prevent any |
| 59 |
cleanup. |
| 60 |
|
| 61 |
.. option:: -c, --checkpoint |
| 62 |
|
| 63 |
Checkpoint and archive (a copy of) the database. |
| 64 |
|
| 65 |
Changes to the database which are part of the committed transactions |
| 66 |
are written to disk. |
| 67 |
|
| 68 |
The archive is created via a *hot* backup, and inactive log files |
| 69 |
are removed. |
| 70 |
|
| 71 |
Examples |
| 72 |
======== |
| 73 |
|
| 74 |
.. parsed-literal:: |
| 75 |
|
| 76 |
**ctl_cyrusdb -r** |
| 77 |
|
| 78 |
.. |
| 79 |
|
| 80 |
Recover databases, performing cleanup. This is commonly used in |
| 81 |
the **START** section of :cyrusman:`cyrus.conf(5)`. |
| 82 |
|
| 83 |
.. only:: html |
| 84 |
|
| 85 |
:: |
| 86 |
|
| 87 |
START { |
| 88 |
# do not delete this entry! |
| 89 |
recover cmd="/usr/local/bin/ctl_cyrusdb -r" |
| 90 |
<...> |
| 91 |
|
| 92 |
|
| 93 |
.. parsed-literal:: |
| 94 |
|
| 95 |
**ctl_cyrusdb -x -r** |
| 96 |
|
| 97 |
.. |
| 98 |
|
| 99 |
Recover database only. |
| 100 |
|
| 101 |
|
| 102 |
.. parsed-literal:: |
| 103 |
|
| 104 |
**ctl_cyrusdb -c** |
| 105 |
|
| 106 |
.. |
| 107 |
|
| 108 |
Checkpoint databases. Commonly used in the **EVENTS** section of |
| 109 |
:cyrusman:`cyrus.conf(5)`. |
| 110 |
|
| 111 |
.. only:: html |
| 112 |
|
| 113 |
:: |
| 114 |
|
| 115 |
EVENTS { |
| 116 |
# this is required |
| 117 |
checkpoint cmd="/usr/local/bin/ctl_cyrusdb -c" period=30 |
| 118 |
<...> |
| 119 |
|
| 120 |
Files |
| 121 |
===== |
| 122 |
/etc/imapd.conf |
| 123 |
/etc/cyrus.conf |
| 124 |
|
| 125 |
See Also |
| 126 |
======== |
| 127 |
:cyrusman:`cyrus.conf(5)`, :cyrusman:`imapd.conf(5)`, :cyrusman:`master(8)` |