]> git.notmuchmail.org Git - notmuch/blob - doc/man1/notmuch-restore.rst
doc: document notmuch-restore --input=filename option
[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     ``--input=``\ <filename>
54         Read input from given file instead of stdin.
55
56 GZIPPED INPUT
57 =============
58
59 \ **notmuch restore** will detect if the input is compressed in
60 **gzip(1)** format and automatically decompress it while reading. This
61 detection does not depend on file naming and in particular works for
62 standard input.
63
64 SEE ALSO
65 ========
66
67 **notmuch(1)**, **notmuch-config(1)**, **notmuch-count(1)**,
68 **notmuch-dump(1)**, **notmuch-hooks(5)**, **notmuch-insert(1)**,
69 **notmuch-new(1)**, **notmuch-reply(1)**, **notmuch-search(1)**,
70 **notmuch-search-terms(7)**, **notmuch-show(1)**, **notmuch-tag(1)**