+Notmuch supports running [user defined
+hooks](https://notmuchmail.org/doc/latest/man5/notmuch-hooks.html)
+before or after certain commands. Hooks can be arbitrary executable
+programs or scripts. For example, if you always run your mail delivery
+tool first and `notmuch new` after that, you can run the tool from
+Notmuch `pre-new` hook, and simply run `notmuch new` to do both. If
+you always do some tagging after indexing of new messages, you may
+want to set up a `post-new` or `post-insert` hook to do that
+automatically.
+
+## Backing Up and Restoring the Database
+
+The Notmuch database contains a search index of your messages, along with all
+the tags you've added to your messages. The search index can be regenerated by
+indexing the messages again, but the tags will be lost if the database is
+lost. (If you have `maildir.synchronize_flags` configuration option enabled,
+also some of the tags can be regenerated from maildir flags.)
+
+To create a plain-text dump of the tags, run
+
+ notmuch dump --output=dump.txt
+
+To restore the tags from the dump, run
+
+ notmuch restore --input=dump.txt