Debian Codegraph @

doc/html/_sources/imap/concepts/features/archiving.rst.txt

raw
1 .. _imap-features-archiving:
2
3 =========
4 Archiving
5 =========
6
7 Description
8 ===========
9
10 When we talk about "Archiving" in Cyrus (from 3.0 onwards) we're not
11 talking about data retention, what we're really talking about is
12 time-tiered storage. Elsewhere in these documents we discuss
13 :ref:`storage tiering <imap-deployment-storage-performance>` based on
14 things like space limitations or :ref:`scalability
15 <imap-deployment-storage-scalability>`. Archiving is somewhat like
16 this, but with an accompanying configuration syntax which determines
17 the management of the tiered data on an ongoing basis.
18
19 Purpose
20 =======
21
22 The general intent of archiving, as deployed within Cyrus, is to allow
23 administrators to dictate that there be two tiers of data storage for
24 each mail spool partition: "current" and "archive." The common use case
25 is to use higher speed storage media for the former, and lower cost
26 media for the latter; Current goes on SSDs, and Archive goes on
27 traditional spinning media.
28
29 Enabling
30 ========
31
32 Archive operation in Cyrus is enabled via the ``archive_enabled``
33 setting in :cyrusman:`imapd.conf(5)`:
34
35 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
36 :start-after: startblob archive_enabled
37 :end-before: endblob archive_enabled
38
39 Defining
40 ========
41
42 The configuration suite provides directives to define these partitions:
43
44 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
45 :start-after: startblob archivepartition-name
46 :end-before: endblob archivepartition-name
47
48 Controlling
49 ===========
50
51 And to control the criteria used to manage migration of data between
52 partitions:
53
54 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
55 :start-after: startblob archive_after
56 :end-before: endblob archive_after
57
58 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
59 :start-after: startblob archive_maxsize
60 :end-before: endblob archive_maxsize
61
62 .. include:: /imap/reference/manpages/configs/imapd.conf.rst
63 :start-after: startblob archive_keepflagged
64 :end-before: endblob archive_keepflagged
65
66 .. note::
67
68 Further explanation is probably required for the
69 ``archive_maxsize`` option. The value is a threshold. Messages
70 larger than this threshold will be immediately put onto the archive
71 partition, rather than waiting ``archive_days`` number of days.
72 This is to keep the high speed storage available for the largest
73 number of "current" messages.
74
75 So ``archive_maxsize`` is not the maximum size of messages which
76 will be archived, but rather is the threshold above which they will
77 immediately be.
78
79 Performing
80 ==========
81
82 Finally, the actual migration is handled by invoking
83 :cyrusman:`cyr_expire(8)` with its ``-A`` flag, as shown here in
84 a sample snippet from :cyrusman:`cyrus.conf(5)` (but could also be done
85 via ``cron``)::
86
87 EVENTS {
88 ...
89 archive cmd="cyr_expire -A 7d" at=0403
90 ...
91 }