]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-restore.rst
1cfaaaed401e8b77745407deeb78a8ed624c1aeb
[notmuch] / doc / man1 / notmuch-restore.rst
1 ===============
2 notmuch-restore
3 ===============
4
5 SYNOPSIS
6 ========
7
8 **notmuch** **restore** [--accumulate] [--format=(auto|batch-tag|sup)] [--input=<*filename*>]
9
10 DESCRIPTION
11 ===========
12
13 Restores the tags from the given file (see **notmuch dump**).
14
15 The input is read from the given filename, if any, or from stdin.
16
17 Supported options for **restore** include
18
19     ``--accumulate``
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
22         file.
23
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
27         the actual formats, see **notmuch-dump(1)**.
28
29         **sup**
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).
35
36         **batch-tag**
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)**
40             for details on this format.
41
42             **notmuch restore** updates the maildir flags according to
43             tag changes if the **maildir.synchronize\_flags**
44             configuration option is enabled. See **notmuch-config(1)**
45             for details.
46
47         **auto**
48             This option (the default) tries to guess the format from the
49             input. For correctly formed input in either supported
50             format, this heuristic, based the fact that batch-tag format
51             contains no parentheses, should be accurate.
52
53     ``--include=(config|properties|tags)``
54
55       Control what kind of metadata is restored.
56
57         **config**
58
59           Restore configuration data to the database. Each configuration line starts
60           with "#@ ", followed by a space separated key-value pair.
61           Both key and value are hex encoded if needed.
62
63         **properties**
64
65           Restore per-message (key,value) metadata.  Each line starts
66           with "#= ", followed by a message id, and a space separated
67           list of key=value pairs.  Ids, keys and values are hex
68           encoded if needed.
69
70         **tags**
71
72           Restore per-message metadata, namely tags. See *format* above
73           for more details.
74
75       The default is to restore all available types of data.  The
76       option can be specified multiple times to select some subset.
77
78     ``--input=``\ <filename>
79         Read input from given file instead of stdin.
80
81 GZIPPED INPUT
82 =============
83
84 \ **notmuch restore** will detect if the input is compressed in
85 **gzip(1)** format and automatically decompress it while reading. This
86 detection does not depend on file naming and in particular works for
87 standard input.
88
89 SEE ALSO
90 ========
91
92 **notmuch(1)**,
93 **notmuch-config(1)**,
94 **notmuch-count(1)**,
95 **notmuch-dump(1)**,
96 **notmuch-hooks(5)**,
97 **notmuch-insert(1)**,
98 **notmuch-new(1)**,
99 **notmuch-reply(1)**,
100 **notmuch-search(1)**,
101 **notmuch-search-terms(7)**,
102 **notmuch-show(1)**,
103 **notmuch-tag(1)**