unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* Breakage after updating to 0.32 (database and path issues)
@ 2021-05-09 14:58 Jack Kamm
  2021-05-09 17:51 ` David Bremner
  2021-05-09 17:54 ` Jack Kamm
  0 siblings, 2 replies; 9+ messages in thread
From: Jack Kamm @ 2021-05-09 14:58 UTC (permalink / raw)
  To: notmuch

Updating to 0.32 broke my notmuch setup. notmuch could no longer find my
database; after I changed some paths in my config, notmuch appeared to
be able to find the database again, but wound up rebuilding it anyways,
and could no longer find any of my emails.

Any advice on fixing my setup would be appreciated. Also, I would
suggest adding information to the v0.32 release notes of any breaking
changes that were made, and how to migrate existing setups.

I'm on Archlinux, and my email is located in $HOME/mail, with each of my
accounts located under a different subfolder (e.g. $HOME/mail/gmail,
$HOME/mail/work, etc).

Below are details of the problems I ran into after updating to 0.32:

First, notmuch could no longer find my database at $HOME/mail/.notmuch:

> $ notmuch new
> Error: Cannot open database at /home/jack/.local/share/notmuch/default: No such file or directory.

According to the manpage of notmuch-config, I should be able to fix
this by unsetting database.mail_root and leaving database.path to
$HOME/mail:

> database.path
>        Notmuch will store its database here,  (in  sub-directory  named
>        .notmuch if database.mail_root is unset).
>
>        Default: $MAILDIR variable if set, otherwise $HOME/mail.
>
> database.mail_root
>        The top-level directory where your mail currently exists and to where mail will be delivered in the future. Files should be individual email messages.
> 
>        History: this configuration value was introduced in notmuch 0.32.
> 
>        Default: For compatibility with older configurations, the value of database.path is used if database.mail_root is unset.

But contrary to the manpage this didn't fix the problem:

> $ notmuch config set database.mail_root ""
> $ notmuch new                                                                                                                                              
> Error: Cannot open database at /home/jack/.local/share/notmuch/default: No such file or directory.

At this point I manually set database.path, but I got a new error this time:

> $ notmuch config set database.path $HOME/mail/.notmuch
> $ notmuch new                                                         
> Warning: failed to open directory : No such file or directory                 
> Found 0 total files (that's not much mail).                                 
> Error reading directory : No such file or directory                         
> No new mail.                                                                         
> Note: A fatal error was encountered: Something went wrong trying to read or write a file

Then I removed the setting for database.mail_root in my
.notmuch-config, at which point "notmuch new" was able to
run. However, it seems to have decided to rebuild the whole database,
and now notmuch-show is not finding any emails.

> notmuch new                                                                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/flintlock                                                                                                   
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/iamchert                                                                                                    
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.DB                                                                                                   
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.DB                                                                                                 
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.baseB                                                                                                
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/postlist.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/position.baseB                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/termlist.baseA                                                                                              
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/xapian/record.baseA                                                                                                
> Note: Ignoring non-mail file: /home/jack/mail/.notmuch/dump-20180526T233634.gz                                                                                            
> Processed 15 total files in 18m 24s (0 files/sec.).                                                                                                                       
> No new mail. Removed 884086 messages. Detected 12226 file renames.

I'm also quite concerned about the "Removed 884086 messages." I'm
guessing it only removed entries from the database, and doesn't seem to
have deleted any files. But I need to double check my afew filters and
mbsync configuration, to make sure no deletions propagate back to my
remote. In the meantime I'm refraining from running mbsync/notmuch until
I can verify that nothing will get deleted.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-16 23:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-09 14:58 Breakage after updating to 0.32 (database and path issues) Jack Kamm
2021-05-09 17:51 ` David Bremner
2021-05-09 18:08   ` Jack Kamm
2021-05-09 17:54 ` Jack Kamm
2021-05-09 18:52   ` Jack Kamm
2021-05-10 10:39   ` [PATCH] lib/open: restore default database path of $HOME/mail David Bremner
2021-05-15 12:12     ` David Bremner
2021-05-10 10:50   ` Breakage after updating to 0.32 (database and path issues) David Bremner
2021-05-16 23:50     ` Jack Kamm

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).