1NOTMUCH-DUMP(1)                     notmuch                    NOTMUCH-DUMP(1)
2
3
4

NAME

6       notmuch-dump - creates a plain-text dump of the tags of each message
7

SYNOPSIS

9       notmuch dump [--gzip] [--format=(batch-tag|sup)] [--output=<file>] [--]
10       [<search-term> ...]
11

DESCRIPTION

13       Dump tags for messages matching the given search terms.
14
15       Output is to the given filename, if any, or to stdout.
16
17       These tags are the only data in the  notmuch  database  that  can't  be
18       recreated  from  the messages themselves. The output of notmuch dump is
19       therefore the only critical thing to backup (and much more friendly  to
20       incremental backup than the native database files.)
21
22       See  notmuch-search-terms  for  details  of  the  supported  syntax for
23       <search-terms>. With no search terms, a dump of  all  messages  in  the
24       database  will  be  generated. A -- argument instructs notmuch that the
25       remaining arguments are search terms.
26
27       Supported options for dump include
28
29       --gzip Compress the output in a format compatible with gzip(1).
30
31       --format=(sup|batch-tag)
32              Notmuch restore supports two plain text dump formats, both  with
33              one message-id per line, followed by a list of tags.
34
35              batch-tag
36                     The default batch-tag dump format is intended to more ro‐
37                     bust against malformed message-ids  and  tags  containing
38                     whitespace  or non-ascii(7) characters. Each line has the
39                     form:
40
41                        +<*encoded-tag*\ > +<*encoded-tag*\ > ... -- id:<*quoted-message-id*\ >
42
43                     Tags are hex-encoded by replacing every byte not matching
44                     the regex [A-Za-z0-9@=.,_+-] with %nn where nn is the two
45                     digit hex encoding. The message  ID  is  a  valid  Xapian
46                     query, quoted using Xapian boolean term quoting rules: if
47                     the ID contains whitespace or a  close  paren  or  starts
48                     with a double quote, it must be enclosed in double quotes
49                     and double quotes inside the ID must be doubled. The  as‐
50                     tute  reader  will  notice  this is a special case of the
51                     batch input format for notmuch-tag; note that the  single
52                     message-id query is mandatory for notmuch-restore.
53
54              sup    The  sup  dump  file  format is specifically chosen to be
55                     compatible  with  the  format  of   files   produced   by
56                     sup-dump(1).  So  if you've previously been using sup for
57                     mail, then the notmuch-restore command provides you a way
58                     to import all of your tags (or labels as sup calls them).
59                     Each line has the following form:
60
61                        <*message-id*\ > **(** <*tag*\ > ... **)**
62
63                     with zero or more tags are separated by spaces. Note that
64                     (malformed)  message-ids  may  contain arbitrary non-null
65                     characters. Note also that tags with spaces will  not  be
66                     correctly restored with this format.
67
68       --include=(config|properties|tags)
69              Control what kind of metadata is included in the output.
70
71              config Output  configuration  data  stored in the database. Each
72                     line starts with "#@ ", followed  by  a  space  separated
73                     key-value  pair.   Both  key and value are hex encoded if
74                     needed.
75
76              properties
77                     Output  per-message  (key,value)  metadata.   Each   line
78                     starts  with "#= ", followed by a message id, and a space
79                     separated list of key=value pairs.  Ids, keys and  values
80                     are  hex  encoded  if needed.  See notmuch-properties for
81                     more details.
82
83              tags   Output per-message boolean  metadata,  namely  tags.  See
84                     format above for description of the output.
85
86              The  default is to include all available types of data.  The op‐
87              tion can be specified multiple times to select some  subset.  As
88              of  version  3 of the dump format, there is a header line of the
89              following form:
90
91                 #notmuch-dump <*format*>:<*version*> <*included*>
92
93              where <included> is a comma separated list of the above options.
94
95       --output=<filename>
96              Write output to given file instead of stdout.
97

SEE ALSO

99       notmuch, notmuch-config, notmuch-count, notmuch-hooks,  notmuch-insert,
100       notmuch-new,    notmuch-properties,   notmuch-reply,   notmuch-restore,
101       notmuch-search, notmuch-search-terms, notmuch-show, notmuch-tag
102

AUTHOR

104       Carl Worth and many others
105
107       2009-2022, Carl Worth and many others
108
109
110
111
1120.37                             Aug 22, 2022                  NOTMUCH-DUMP(1)
Impressum