]> git.notmuchmail.org Git - notmuch/blob - man/man1/notmuch-restore.1
notmuch-{dump,restore}.1: document new format options
[notmuch] / man / man1 / notmuch-restore.1
1 .TH NOTMUCH-RESTORE 1 2012-08-20 "Notmuch 0.14"
2 .SH NAME
3 notmuch-restore \- restores the tags from the given file (see notmuch dump)
4
5 .SH SYNOPSIS
6
7 .B "notmuch restore"
8 .RB [ "--accumulate" ]
9 .RB [ "--format=(auto|batch-tag|sup)" ]
10 .RI "[ --input=<" filename "> ]"
11
12 .SH DESCRIPTION
13
14 Restores the tags from the given file (see
15 .BR "notmuch dump" ")."
16
17 The input is read from the given filename, if any, or from stdin.
18
19
20 Supported options for
21 .B restore
22 include
23 .RS 4
24 .TP 4
25 .B \-\-accumulate
26
27 The union of the existing and new tags is applied, instead of
28 replacing each message's tags as they are read in from the dump file.
29
30 .RE
31 .RS 4
32 .TP 4
33 .B \-\-format=(sup|batch-tag|auto)
34
35 Notmuch restore supports two plain text dump formats, with each line
36 specifying a message-id and a set of tags.
37 For details of the actual formats, see \fBnotmuch-dump\fR(1).
38
39 .RS 4
40 .TP 4
41 .B sup
42
43 The
44 .B sup
45 dump file format is specifically chosen to be
46 compatible with the format of files produced by sup-dump.
47 So if you've previously been using sup for mail, then the
48 .B "notmuch restore"
49 command provides you a way to import all of your tags (or labels as
50 sup calls them).
51
52 .RE
53 .RS 4
54 .TP 4
55 .B batch-tag
56
57 The
58 .B batch-tag
59 dump format is intended to more robust against malformed message-ids
60 and tags containing whitespace or non-\fBascii\fR(7) characters.  This
61 format hex-escapes all characters those outside of a small character
62 set, intended to be suitable for e.g. pathnames in most UNIX-like
63 systems.
64
65 .B "notmuch restore"
66 updates the maildir flags according to tag changes if the
67 .B "maildir.synchronize_flags"
68 configuration option is enabled. See \fBnotmuch-config\fR(1) for
69 details.
70
71 .RE
72
73 .RS 4
74 .TP 4
75 .B auto
76
77 This option (the default) tries to guess the format from the
78 input. For correctly formed input in either supported format, this
79 heuristic, based the fact that batch-tag format contains no parentheses,
80 should be accurate.
81
82 .RE
83
84 .RE
85
86 .SH SEE ALSO
87
88 \fBnotmuch\fR(1), \fBnotmuch-config\fR(1), \fBnotmuch-count\fR(1),
89 \fBnotmuch-dump\fR(1), \fBnotmuch-hooks\fR(5), \fBnotmuch-new\fR(1),
90 \fBnotmuch-reply\fR(1), \fBnotmuch-search\fR(1),
91 \fBnotmuch-search-terms\fR(7), \fBnotmuch-show\fR(1),
92 \fBnotmuch-tag\fR(1)