Debian Codegraph @

doc/html/imap/concepts/features/archiving.html

raw
1 <!DOCTYPE html>
2 <html class="writer-html5" lang="en" data-content_root="../../../">
3 <head>
4 <meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
5
6 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7 <title>Archiving &mdash; Cyrus IMAP 3.12.3 documentation</title>
8 <link rel="stylesheet" type="text/css" href="../../../_static/pygments.css?v=fa44fd50" />
9 <link rel="stylesheet" type="text/css" href="../../../_static/css/theme.css?v=86f27845" />
10 <link rel="stylesheet" type="text/css" href="../../../_static/graphviz.css?v=eafc0fe6" />
11 <link rel="stylesheet" href="../../../_static/cyrus.css" type="text/css" />
12
13
14
15 <script src="../../../_static/jquery.js?v=8dae8fb0"></script>
16 <script src="../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
17 <script src="../../../_static/documentation_options.js?v=2c828074"></script>
18 <script src="../../../_static/doctools.js?v=888ff710"></script>
19 <script src="../../../_static/sphinx_highlight.js?v=dc90522c"></script>
20 <script src="../../../_static/js/theme.js"></script>
21 <link rel="index" title="Index" href="../../../genindex.html" />
22 <link rel="search" title="Search" href="../../../search.html" />
23 <link rel="next" title="Quota" href="quota.html" />
24 <link rel="prev" title="Mailbox Metadata Partitions" href="mailbox-metadata-partitions.html" />
25 </head>
26
27 <body class="wy-body-for-nav">
28 <div class="wy-grid-for-nav">
29 <nav data-toggle="wy-nav-shift" class="wy-nav-side">
30 <div class="wy-side-scroll">
31 <div class="wy-side-nav-search" >
32
33
34
35 <a href="../../../index.html" class="icon icon-home">
36 Cyrus IMAP
37 </a>
38 <div class="version">
39 3.12.3
40 </div>
41 <div role="search">
42 <form id="rtd-search-form" class="wy-form" action="../../../search.html" method="get">
43 <input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
44 <input type="hidden" name="check_keywords" value="yes" />
45 <input type="hidden" name="area" value="default" />
46 </form>
47 </div>
48 </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
49 <p class="caption" role="heading"><span class="caption-text">Cyrus IMAP</span></p>
50 <ul class="current">
51 <li class="toctree-l1"><a class="reference internal" href="../../../download.html">Download</a></li>
52 <li class="toctree-l1"><a class="reference internal" href="../../../quickstart.html">Quickstart Guide</a></li>
53 <li class="toctree-l1 current"><a class="reference internal" href="../../../overview.html">Overview</a><ul class="current">
54 <li class="toctree-l2 current"><a class="reference internal" href="../features.html">Features</a><ul class="current">
55 <li class="toctree-l3"><a class="reference internal" href="../features.html#security-and-authentication">Security and Authentication</a></li>
56 <li class="toctree-l3"><a class="reference internal" href="../features.html#mailbox-management">Mailbox Management</a></li>
57 <li class="toctree-l3"><a class="reference internal" href="../features.html#message-management">Message Management</a></li>
58 <li class="toctree-l3"><a class="reference internal" href="../features.html#calendar-and-contact-dav-collection-management">Calendar and Contact (DAV) Collection Management</a></li>
59 <li class="toctree-l3 current"><a class="reference internal" href="../features.html#storage">Storage</a><ul class="current">
60 <li class="toctree-l4"><a class="reference internal" href="mail-spool-partitions.html">Mail Spool Partitions</a></li>
61 <li class="toctree-l4"><a class="reference internal" href="mailbox-metadata-partitions.html">Mailbox Metadata Partitions</a></li>
62 <li class="toctree-l4 current"><a class="current reference internal" href="#">Archiving</a></li>
63 <li class="toctree-l4"><a class="reference internal" href="quota.html">Quota</a></li>
64 <li class="toctree-l4"><a class="reference internal" href="single-instance-store.html">Single-Instance Store</a></li>
65 </ul>
66 </li>
67 <li class="toctree-l3"><a class="reference internal" href="../features.html#load-management">Load Management</a></li>
68 </ul>
69 </li>
70 <li class="toctree-l2"><a class="reference internal" href="../overview_and_concepts.html">Concepts</a></li>
71 </ul>
72 </li>
73 <li class="toctree-l1"><a class="reference internal" href="../../../setup.html">Setup</a></li>
74 <li class="toctree-l1"><a class="reference internal" href="../../../operations.html">Operations</a></li>
75 <li class="toctree-l1"><a class="reference internal" href="../../../developers.html">Developers</a></li>
76 <li class="toctree-l1"><a class="reference internal" href="../../../support.html">Support/Community</a></li>
77 </ul>
78 <p class="caption" role="heading"><span class="caption-text">Cyrus SASL</span></p>
79 <ul>
80 <li class="toctree-l1"><a class="reference external" href="http://www.cyrusimap.org/sasl">Cyrus SASL</a></li>
81 </ul>
82
83 </div>
84 </div>
85 </nav>
86
87 <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
88 <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
89 <a href="../../../index.html">Cyrus IMAP</a>
90 </nav>
91
92 <div class="wy-nav-content">
93 <div class="rst-content">
94 <div role="navigation" aria-label="Page navigation">
95 <ul class="wy-breadcrumbs">
96 <li><a href="../../../index.html" class="icon icon-home" aria-label="Home"></a></li>
97 <li class="breadcrumb-item"><a href="../../../overview.html">Overview</a></li>
98 <li class="breadcrumb-item"><a href="../features.html">Features</a></li>
99 <li class="breadcrumb-item active">Archiving</li>
100 <li class="wy-breadcrumbs-aside">
101 <a href="https://github.com/cyrusimap/cyrus-imapd/blob/master/docsrc/imap/concepts/features/archiving.rst" class="fa fa-github"> Edit on GitHub</a>
102 </li>
103 </ul>
104 <hr/>
105 </div>
106 <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
107 <div itemprop="articleBody">
108
109 <section id="archiving">
110 <span id="imap-features-archiving"></span><h1>Archiving<a class="headerlink" href="#archiving" title="Link to this heading"></a></h1>
111 <section id="description">
112 <h2>Description<a class="headerlink" href="#description" title="Link to this heading"></a></h2>
113 <p>When we talk about &quot;Archiving&quot; in Cyrus (from 3.0 onwards) we're not
114 talking about data retention, what we're really talking about is
115 time-tiered storage. Elsewhere in these documents we discuss
116 <a class="reference internal" href="../deployment/storage.html#imap-deployment-storage-performance"><span class="std std-ref">storage tiering</span></a> based on
117 things like space limitations or <a class="reference internal" href="../deployment/storage.html#imap-deployment-storage-scalability"><span class="std std-ref">scalability</span></a>. Archiving is somewhat like
118 this, but with an accompanying configuration syntax which determines
119 the management of the tiered data on an ongoing basis.</p>
120 </section>
121 <section id="purpose">
122 <h2>Purpose<a class="headerlink" href="#purpose" title="Link to this heading"></a></h2>
123 <p>The general intent of archiving, as deployed within Cyrus, is to allow
124 administrators to dictate that there be two tiers of data storage for
125 each mail spool partition: &quot;current&quot; and &quot;archive.&quot; The common use case
126 is to use higher speed storage media for the former, and lower cost
127 media for the latter; Current goes on SSDs, and Archive goes on
128 traditional spinning media.</p>
129 </section>
130 <section id="enabling">
131 <h2>Enabling<a class="headerlink" href="#enabling" title="Link to this heading"></a></h2>
132 <p>Archive operation in Cyrus is enabled via the <code class="docutils literal notranslate"><span class="pre">archive_enabled</span></code>
133 setting in <a class="reference internal" href="../../reference/manpages/configs/imapd.conf.html#std-cyrusman-imapd.conf-5">imapd.conf(5)</a>:</p>
134 <blockquote>
135 <div><p><code class="docutils literal notranslate"><span class="pre">archive_enabled:</span></code> 0</p>
136 <blockquote>
137 <div><p>Is archiving enabled for this server. You also need to have an
138 archivepartition for the mailbox. Archiving allows older email
139 to be stored on slower, cheaper disks - even within the same
140 mailbox, as distinct from partitions.</p>
141 </div></blockquote>
142 </div></blockquote>
143 </section>
144 <section id="defining">
145 <h2>Defining<a class="headerlink" href="#defining" title="Link to this heading"></a></h2>
146 <p>The configuration suite provides directives to define these partitions:</p>
147 <blockquote>
148 <div><p><code class="docutils literal notranslate"><span class="pre">archivepartition-name:</span></code> &lt;none&gt;</p>
149 <blockquote>
150 <div><p>The pathname of the archive partition <em>name</em>, corresponding to
151 spool partition <strong>partition-name</strong>. For any mailbox residing in
152 a directory on <strong>partition-name</strong>, the archived messages will be
153 stored in a corresponding directory on <strong>archivepartition-name</strong>.
154 Note that not every <strong>partition-name</strong> option is strictly required
155 to have a corresponding <strong>archivepartition-name</strong> option, but that
156 without one there's no benefit to enabling archiving.</p>
157 </div></blockquote>
158 </div></blockquote>
159 </section>
160 <section id="controlling">
161 <h2>Controlling<a class="headerlink" href="#controlling" title="Link to this heading"></a></h2>
162 <p>And to control the criteria used to manage migration of data between
163 partitions:</p>
164 <blockquote>
165 <div><p><code class="docutils literal notranslate"><span class="pre">archive_after:</span></code> 7d</p>
166 <blockquote>
167 <div><p>The duration after which to move messages to the archive partition
168 if archiving is enabled.</p>
169 <p>For backward compatibility, if no unit is specified, days is
170 assumed.</p>
171 </div></blockquote>
172 </div></blockquote>
173 <blockquote>
174 <div><p><code class="docutils literal notranslate"><span class="pre">archive_maxsize:</span></code> 1024 K</p>
175 <blockquote>
176 <div><p>The size of the largest message that won't be archived immediately.</p>
177 <p>For backward compatibility, if no unit is specified, kibibytes is
178 assumed.</p>
179 </div></blockquote>
180 </div></blockquote>
181 <blockquote>
182 <div><p><code class="docutils literal notranslate"><span class="pre">archive_keepflagged:</span></code> 0</p>
183 <blockquote>
184 <div><p>If set, messages with the \Flagged system flag won't be archived,
185 provided they are smaller than <strong>archive_maxsize</strong>.</p>
186 </div></blockquote>
187 </div></blockquote>
188 <div class="admonition note">
189 <p class="admonition-title">Note</p>
190 <p>Further explanation is probably required for the
191 <code class="docutils literal notranslate"><span class="pre">archive_maxsize</span></code> option. The value is a threshold. Messages
192 larger than this threshold will be immediately put onto the archive
193 partition, rather than waiting <code class="docutils literal notranslate"><span class="pre">archive_days</span></code> number of days.
194 This is to keep the high speed storage available for the largest
195 number of &quot;current&quot; messages.</p>
196 <p>So <code class="docutils literal notranslate"><span class="pre">archive_maxsize</span></code> is not the maximum size of messages which
197 will be archived, but rather is the threshold above which they will
198 immediately be.</p>
199 </div>
200 </section>
201 <section id="performing">
202 <h2>Performing<a class="headerlink" href="#performing" title="Link to this heading"></a></h2>
203 <p>Finally, the actual migration is handled by invoking
204 <a class="reference internal" href="../../reference/manpages/systemcommands/cyr_expire.html#std-cyrusman-cyr_expire-8">cyr_expire(8)</a> with its <code class="docutils literal notranslate"><span class="pre">-A</span></code> flag, as shown here in
205 a sample snippet from <a class="reference internal" href="../../reference/manpages/configs/cyrus.conf.html#std-cyrusman-cyrus.conf-5">cyrus.conf(5)</a> (but could also be done
206 via <code class="docutils literal notranslate"><span class="pre">cron</span></code>):</p>
207 <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">EVENTS</span> <span class="p">{</span>
208 <span class="o">...</span>
209 <span class="n">archive</span> <span class="n">cmd</span><span class="o">=</span><span class="s2">&quot;cyr_expire -A 7d&quot;</span> <span class="n">at</span><span class="o">=</span><span class="mi">0403</span>
210 <span class="o">...</span>
211 <span class="p">}</span>
212 </pre></div>
213 </div>
214 </section>
215 </section>
216
217
218 </div>
219 </div>
220 <footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
221 <a href="mailbox-metadata-partitions.html" class="btn btn-neutral float-left" title="Mailbox Metadata Partitions" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
222 <a href="quota.html" class="btn btn-neutral float-right" title="Quota" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
223 </div>
224
225 <hr/>
226
227 <div role="contentinfo">
228 <p>&#169; Copyright 1993–2026, The Cyrus Team.</p>
229 </div>
230
231 Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
232 <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
233 provided by <a href="https://readthedocs.org">Read the Docs</a>.
234
235
236 </footer>
237 </div>
238 </div>
239 </section>
240 </div>
241 <script>
242 jQuery(function () {
243 SphinxRtdTheme.Navigation.enable(true);
244 });
245 </script>
246
247
248
249
250 </body>
251 </html>