1NOTMUCH-RESTORE(1) notmuch NOTMUCH-RESTORE(1)
2
3
4
6 notmuch-restore - restores the tags from the given file (see notmuch
7 dump)
8
10 notmuch restore [--accumulate] [--format=(auto|batch-tag|sup)]
11 [--input=<filename>]
12
14 Restores the tags from the given file (see notmuch dump).
15
16 The input is read from the given filename, if any, or from stdin.
17
18 Supported options for restore include
19
20 --accumulate
21 The union of the existing and new tags is applied, instead of
22 replacing each message's tags as they are read in from the dump
23 file.
24
25 --format=(sup|batch-tag|auto)
26 Notmuch restore supports two plain text dump formats, with each
27 line specifying a message-id and a set of tags. For details of
28 the actual formats, see notmuch-dump(1).
29
30 sup The sup dump file format is specifically chosen to be
31 compatible with the format of files produced by sup-dump.
32 So 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).
35
36 batch-tag
37 The batch-tag dump format is intended to more robust
38 against malformed message-ids and tags containing white‐
39 space or non-ascii(7) characters. See notmuch-dump(1) for
40 details on this format.
41
42 notmuch restore updates the maildir flags according to
43 tag changes if the maildir.synchronize_flags configura‐
44 tion option is enabled. See notmuch-config(1) for
45 details.
46
47 auto This option (the default) tries to guess the format from
48 the input. For correctly formed input in either supported
49 format, this heuristic, based the fact that batch-tag
50 format contains no parentheses, should be accurate.
51
52 --include=(config|properties|tags)
53 Control what kind of metadata is restored.
54
55 config Restore configuration data to the database. Each configu‐
56 ration line starts with "#@ ", followed by a space sepa‐
57 rated key-value pair. Both key and value are hex encoded
58 if needed.
59
60 properties
61 Restore per-message (key,value) metadata. Each line
62 starts with "#= ", followed by a message id, and a space
63 separated list of key=value pairs. Ids, keys and values
64 are hex encoded if needed. See notmuch-properties(7) for
65 more details.
66
67 tags Restore per-message metadata, namely tags. See format
68 above for more details.
69
70 The default is to restore all available types of data. The
71 option can be specified multiple times to select some subset.
72
73 --input=<filename>
74 Read input from given file instead of stdin.
75
77 notmuch restore will detect if the input is compressed in gzip(1) for‐
78 mat and automatically decompress it while reading. This detection does
79 not depend on file naming and in particular works for standard input.
80
82 notmuch(1), notmuch-config(1), notmuch-count(1), notmuch-dump(1), not‐
83 much-hooks(5), notmuch-insert(1), notmuch-new(1), notmuch-proper‐
84 ties(7), notmuch-reply(1), notmuch-search(1), notmuch-search-terms(7),
85 notmuch-show(1), notmuch-tag(1)
86
88 Carl Worth and many others
89
91 2009-2019, Carl Worth and many others
92
93
94
95
960.28.4 May 06, 2019 NOTMUCH-RESTORE(1)