GNOME Evolution 3.2 e-mail database recovery

Missing e-mails?  Nothing showing up in your folder, but the “Properties” for the folder says you still have hundreds of messages in there?

If, like me, you’ve ever tried to mark 3000 messages as read all at once, you may have crashed the SQL database at the heart of Novell GNOME Evolution.  If your Inbox is suddenly “empty” — don’t worry!  Evolution is capable of rebuilding the database on its own with only a little prompting.

If this happens to you, I’d recommend making a backup before proceeding.  Use Evolution’s backup option ( File > Backup Evolution Data ) or make a tarball out of your e-mail folder [ The default location on Precise Pangolin is ~/.local/share/evolution ]

Also to keep things neat while you mess around, you ought to take Evolution offline ( File > Work Offline ).  This way, you don’t have any new messages filtering in to gum things up.

Now navigate to your Evolution folder [ in this case, the location is ~/.local/share/evolution/mail/local ] and wrench your database file.  You can delete it, but renaming will suffice.


Now Launch Evolution. You won’t see anything to begin with, although some of your messages may trickle in.  You’ll see a small new folders.db file reflecting the rebuild:dbrebuild

Wait a minute or two until Evolution seems like it’s finished.  You shouldn’t see too much.  Now, to really get things rolling, quit Evolution.

Your disk activity will spike as Evolution syncs with all the files still located on your computer, and folders.db will grow in size too.

dbrepopAll your messages should be restored, but e-mails previously moved to the Junk folder will now be back in your Inbox.  Sorry.

I’m still using Ubuntu Precise with Evolution 3.2, so this may be different in a newer version.