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