]> git.cworth.org Git - notmuch-wiki/blob - manpages/notmuch-restore-1.mdwn
manpages updates for release 0.29
[notmuch-wiki] / manpages / notmuch-restore-1.mdwn
1 <h1>NOTMUCH-RESTORE(1)</h1>
2
3 <h2>NAME</h2>
4 <pre>
5        notmuch-restore  -  restores  the tags from the given file (see notmuch
6        dump)
7 </pre>
8
9 <h2>SYNOPSIS</h2>
10 <pre>
11        <b>notmuch</b>    <b>restore</b>    [--accumulate]    [--format=(auto|batch-tag|sup)]
12        [--input=&lt;<u>filename</u>&gt;]
13 </pre>
14
15 <h2>DESCRIPTION</h2>
16 <pre>
17        Restores the tags from the given file (see <b>notmuch</b> <b>dump</b>).
18
19        The input is read from the given filename, if any, or from stdin.
20
21        Supported options for <b>restore</b> include
22
23        <b>--accumulate</b>
24               The  union  of  the existing and new tags is applied, instead of
25               replacing each message&apos;s tags as they are read in from the  dump
26               file.
27
28        <b>--format=(sup|batch-tag|auto)</b>
29               Notmuch  restore supports two plain text dump formats, with each
30               line specifying a message-id and a set of tags. For  details  of
31               the actual formats, see <a href='../notmuch-dump-1/'>notmuch-dump</a>(1).
32
33               <b>sup</b>    The  <b>sup</b>  dump  file  format is specifically chosen to be
34                      compatible with the format of files produced by sup-dump.
35                      So if you&apos;ve previously been using sup for mail, then the
36                      <b>notmuch</b> <b>restore</b> command provides you a way to import  all
37                      of your tags (or labels as sup calls them).
38
39               <b>batch-tag</b>
40                      The  <b>batch-tag</b>  dump  format  is  intended to more robust
41                      against malformed message-ids and tags containing  white‐
42                      space or non-<b>ascii</b>(7) characters. See <a href='../notmuch-dump-1/'>notmuch-dump</a>(1) for
43                      details on this format.
44
45                      <b>notmuch</b> <b>restore</b> updates the maildir  flags  according  to
46                      tag  changes  if the <b>maildir.synchronize</b>_<b>flags</b> configura‐
47                      tion  option  is  enabled.  See   <a href='../notmuch-config-1/'>notmuch-config</a>(1)   for
48                      details.
49
50               <b>auto</b>   This  option (the default) tries to guess the format from
51                      the input. For correctly formed input in either supported
52                      format,  this  heuristic,  based  the fact that batch-tag
53                      format contains no parentheses, should be accurate.
54
55        <b>--include=(config|properties|tags)</b>
56               Control what kind of metadata is restored.
57
58               <b>config</b> Restore configuration data to the database. Each configu‐
59                      ration  line starts with &quot;#@ &quot;, followed by a space sepa‐
60                      rated key-value pair.  Both key and value are hex encoded
61                      if needed.
62
63               <b>properties</b>
64                      Restore  per-message  (key,value)  metadata.   Each  line
65                      starts with &quot;#= &quot;, followed by a message id, and a  space
66                      separated  list of key=value pairs.  Ids, keys and values
67                      are hex encoded if needed.  See <a href='../notmuch-properties-7/'>notmuch-properties</a>(7) for
68                      more details.
69
70               <b>tags</b>   Restore  per-message  metadata,  namely  tags. See <u>format</u>
71                      above for more details.
72
73               The default is to restore  all  available  types  of  data.  The
74               option can be specified multiple times to select some subset.
75
76        <b>--input=&lt;filename&gt;</b>
77               Read input from given file instead of stdin.
78 </pre>
79
80 <h2>GZIPPED INPUT</h2>
81 <pre>
82        <b>notmuch</b>  <b>restore</b> will detect if the input is compressed in <b>gzip</b>(1) for‐
83        mat and automatically decompress it while reading. This detection  does
84        not depend on file naming and in particular works for standard input.
85 </pre>
86
87 <h2>SEE ALSO</h2>
88 <pre>
89        <a href='../notmuch-1/'>notmuch</a>(1),  <a href='../notmuch-config-1/'>notmuch-config</a>(1), <a href='../notmuch-count-1/'>notmuch-count</a>(1), <a href='../notmuch-dump-1/'>notmuch-dump</a>(1), <a href='../notmuch-hooks-5/'>not‐</a>
90        <a href='../notmuch-hooks-5/'>much-hooks</a>(5),   <a href='../notmuch-insert-1/'>notmuch-insert</a>(1),   <a href='../notmuch-new-1/'>notmuch-new</a>(1),   <a href='../notmuch-properties-7/'>notmuch-proper‐</a>
91        <a href='../notmuch-properties-7/'>ties</a>(7),  <a href='../notmuch-reply-1/'>notmuch-reply</a>(1), <a href='../notmuch-search-1/'>notmuch-search</a>(1), <a href='../notmuch-search-terms-7/'>notmuch-search-terms</a>(7),
92        <a href='../notmuch-show-1/'>notmuch-show</a>(1), <a href='../notmuch-tag-1/'>notmuch-tag</a>(1)
93 </pre>
94
95 <h2>AUTHOR</h2>
96 <pre>
97        Carl Worth and many others
98 </pre>
99
100 <h2>COPYRIGHT</h2>
101 <pre>
102        2009-2019, Carl Worth and many others
103 </pre>
104
105 <h2>0.29</h2>