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