]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-restore.rst
Merge branch 'release'
[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 the
27     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)** for
40         details on this format.
41
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.
45
46     **auto**
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.
51
52 ``--include=(config|properties|tags)``
53     Control what kind of metadata is restored.
54
55     **config**
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.
59
60     **properties**
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.
65
66     **tags**
67         Restore per-message metadata, namely tags. See *format* above
68         for more details.
69
70     The default is to restore all available types of data. The option
71     can be specified multiple times to select some subset.
72
73 ``--input=``\ <filename>
74     Read input from given file instead of stdin.
75
76 GZIPPED INPUT
77 =============
78
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
82 standard input.
83
84 SEE ALSO
85 ========
86
87 **notmuch(1)**,
88 **notmuch-config(1)**,
89 **notmuch-count(1)**,
90 **notmuch-dump(1)**,
91 **notmuch-hooks(5)**,
92 **notmuch-insert(1)**,
93 **notmuch-new(1)**,
94 **notmuch-properties(7)**,
95 **notmuch-reply(1)**,
96 **notmuch-search(1)**,
97 **notmuch-search-terms(7)**,
98 **notmuch-show(1)**,
99 **notmuch-tag(1)**