8 **notmuch** **restore** [--accumulate] [--format=(auto|batch-tag|sup)] [--input=<*filename*>]
13 Restores the tags from the given file (see **notmuch dump**).
15 The input is read from the given filename, if any, or from stdin.
17 Supported options for **restore** include
20 The union of the existing and new tags is applied, instead of
21 replacing each message's tags as they are read in from the dump
24 ``--format=(sup|batch-tag|auto)``
25 Notmuch restore supports two plain text dump formats, with each
26 line specifying a message-id and a set of tags. For details of the
27 actual formats, see **notmuch-dump(1)**.
30 The **sup** dump file format is specifically chosen to be
31 compatible with the format of files produced by sup-dump. So
32 if you've previously been using sup for mail, then the
33 **notmuch restore** command provides you a way to import all
34 of your tags (or labels as sup calls them).
37 The **batch-tag** dump format is intended to more robust
38 against malformed message-ids and tags containing whitespace
39 or non-\ **ascii(7)** characters. See **notmuch-dump(1)** for
40 details on this format.
42 **notmuch restore** updates the maildir flags according to tag
43 changes if the **maildir.synchronize\_flags** configuration
44 option is enabled. See **notmuch-config(1)** for details.
47 This option (the default) tries to guess the format from the
48 input. For correctly formed input in either supported format,
49 this heuristic, based the fact that batch-tag format contains
50 no parentheses, should be accurate.
52 ``--include=(config|properties|tags)``
53 Control what kind of metadata is restored.
56 Restore configuration data to the database. Each configuration
57 line starts with "#@ ", followed by a space separated
58 key-value pair. Both key and value are hex encoded if needed.
61 Restore per-message (key,value) metadata. Each line starts
62 with "#= ", followed by a message id, and a space separated
63 list of key=value pairs. Ids, keys and values are hex encoded
64 if needed. See **notmuch-properties(7)** for more details.
67 Restore per-message metadata, namely tags. See *format* above
70 The default is to restore all available types of data. The option
71 can be specified multiple times to select some subset.
73 ``--input=``\ <filename>
74 Read input from given file instead of stdin.
79 \ **notmuch restore** will detect if the input is compressed in
80 **gzip(1)** format and automatically decompress it while reading. This
81 detection does not depend on file naming and in particular works for
88 **notmuch-config(1)**,
92 **notmuch-insert(1)**,
94 **notmuch-properties(7)**,
96 **notmuch-search(1)**,
97 **notmuch-search-terms(7)**,