NOTMUCH-RESTORE(1)

๐Ÿ’– NOTMUCH-RESTORE ๐Ÿ’–

okay bestie, this is notmuch-restore โ€” the glow-up button for your mail tags. it puts all your tags BACK from a file you made earlier (you know, with notmuch dump). it's the reverse-uno of dump. no cap. ๐ŸŽ€


โœจ SYNOPSIS โœจ

notmuch restore [--accumulate] [--format=(auto|batch-tag|sup)]
[--input=<filename>]

๐ŸŒธ DESCRIPTION ๐ŸŒธ

So like. notmuch restore restores the tags from the given file (see notmuch-dump). that's the whole vibe. dump saved them, restore brings them home. ๐Ÿซถ

The input is read from the given filename, if any, or from stdin. easy.

Supported options for restore include:

  • --accumulate โ€” the union of the existing tags and the new tags gets applied, instead of straight-up replacing each message's tags as they're read in from the dump file. so you keep what you had AND gain the new stuff. iconic teamwork behavior honestly. ๐Ÿ’…
  • --format=(sup|batch-tag|auto) โ€” notmuch restore supports two plain text dump formats, and each line specifies a message-id and a set of tags. for the details of the actual formats, go peek at notmuch-dump. here's the rundown:
    • sup โ€” the sup dump file format is specifically chosen to be compatible with the format of files produced by sup-dump. so if you've previously been using sup for mail, then the notmuch restore command gives you a way to import all of your tags (or labels, as sup calls them). legacy bestie migration arc, we love to see it. โœจ
    • batch-tag โ€” the batch-tag dump format is intended to be more robust against malformed message-ids and tags containing whitespace or non-ascii(7) characters. see notmuch-dump for details on this format.
notmuch restore updates the maildir flags according to tag changes if the maildir.synchronize_flags configuration option is enabled. see notmuch-config for details.
  • auto โ€” this option (the default!) tries to guess the format from the input. for correctly formed input in either supported format, this heuristic โ€” based on the fact that batch-tag format contains no parentheses โ€” should be accurate. she's guessing but she's guessing well. ๐Ÿ‘‘
  • --include=(config|properties|tags) โ€” controls what kind of metadata actually gets restored. the menu:
    • config โ€” restore configuration data to the database. each configuration line starts with #@ , followed by a space separated key-value pair. both key and value are hex encoded if needed.
    • properties โ€” restore per-message (key,value) metadata. each line starts with #= , followed by a message id, and a space separated list of key=value pairs. ids, keys and values are hex encoded if needed. see notmuch-properties for more details.
    • tags โ€” restore per-message metadata, namely tags. see format above for more details. it's literally in the name bestie.
    • The default is to restore all available types of data. and plot twist: the option can be specified multiple times to select some subset. so pick and choose, it's your world. ๐ŸŒˆ
  • --input=<filename> โ€” read input from the given file instead of stdin. simple. clean. ๐Ÿ’–

๐Ÿฆ‹ GZIPPED INPUT ๐Ÿฆ‹

notmuch restore will detect if the input is compressed in gzip(1) format and automatically decompress it while reading. and the gag is โ€” this detection does not depend on file naming, and in particular works for standard input. so you can just pipe a gzipped blob in and she'll figure it out. mind reading, basically. ๐Ÿ”ฎ


๐Ÿ’œ SEE ALSO ๐Ÿ’œ

  • notmuch
  • notmuch-config
  • notmuch-count
  • notmuch-dump
  • notmuch-hooks
  • notmuch-insert
  • notmuch-new
  • notmuch-properties
  • notmuch-reply
  • notmuch-search
  • notmuch-search-terms
  • notmuch-show
  • notmuch-tag

๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Carl Worth and many others โ€” shoutout to the whole crew, fr fr. ๐Ÿ’

2009-2026, Carl Worth and many others


and that's the page, bestie!! ๐ŸŽ€ this was version 0.40, dated Jan 31, 2026, and it's giving very much "your tags are safe with me." now go restore something and feel gorgeous. mwah. ๐Ÿ’…โœจ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from