1 .. _notmuch-restore(1):
10 **notmuch** **restore** [--accumulate] [--format=(auto|batch-tag|sup)] [--input=<*filename*>]
15 Restores the tags from the given file (see :any:`notmuch-dump(1)`).
17 The input is read from the given filename, if any, or from stdin.
19 Supported options for **restore** include
23 .. option:: --accumulate
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
29 .. option:: --format=(sup|batch-tag|auto)
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)`.
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).
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.
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.
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.
58 .. option:: --include=(config|properties|tags)
60 Control what kind of metadata is restored.
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.
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.
74 Restore per-message metadata, namely tags. See *format* above
77 The default is to restore all available types of data. The option
78 can be specified multiple times to select some subset.
80 .. option:: --input=<filename>
82 Read input from given file instead of stdin.
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.
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)`