summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJani Nikula <jani@nikula.org>2016-03-11 14:43:49 +0200
committerJani Nikula <jani@nikula.org>2016-03-11 14:43:49 +0200
commit19816dd3cd51c70e7a86a685b5b60c2e9059867a (patch)
treea9d44d824f619ff75c70fb67e9564272af9ec396
parent00ca7e9b4ea35bb70e07f67db192bd2fc4d4c856 (diff)
getting-started: backup and restore
-rw-r--r--getting-started.mdwn21
1 files changed, 17 insertions, 4 deletions
diff --git a/getting-started.mdwn b/getting-started.mdwn
index eb83c4c..09f4993 100644
--- a/getting-started.mdwn
+++ b/getting-started.mdwn
@@ -95,7 +95,21 @@ 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
+## 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
## Removing Notmuch
@@ -103,6 +117,5 @@ Did not like it after all? All you need to do is remove the database and the
configuration file. The database is stored in the `.notmuch` directory under
your mail store. And your mail store is at `notmuch config get database.path`.
-Note that the database is where the tags are stored. Everything else can be
-regenerated by indexing again, but the tags will be lost when the database is
-removed. Use the `notmuch dump` command to create a backup of the tags.
+You may want to use the `notmuch dump` command to create a backup of any tags
+you've added before removing the database.