How to restore emails from corrupted conversations.dat file

Hi,
I had some issues with eM Client where it didn’t shut down properly.

I then get this error on the next startup:


MailClient.Storage.Data.DatabaseCorruptedException (0x80004005): SQLite Error 10: ‘disk I/O error’.
Line: 66
UPDATE Conversations SET unreadCount = COALESCE((SELECT counts.count FROM unreadCounts counts WHERE counts.conversationId = Conversations.conversationId), 0)
WHERE Conversations.id IN (
SELECT c.id FROM Conversations c LEFT JOIN unreadCounts counts ON counts.conversationId=c.conversationId WHERE c.unreadCount != COALESCE(counts.count, 0)
);
at MailClient.Storage.Data.DbRepository1.ImportFromResource(IDbConnection connection, Stream myStream, CancellationToken token) at MailClient.Storage.Data.DbRepository1.ImportFromManifestResource(String resourceName, CancellationToken token)
at MailClient.Storage.Data.DbRepository1.Repair(RepairMode mode, CancellationToken token) at MailClient.Accounts.ItemRepositories.Repair(RepairMode mode, CancellationToken token) at MailClient.DbRepair.ConsistencyChecker.CheckConsistencyForAccount(String accountDirectory, RepairMode mode, CancellationToken token) at MailClient.DbRepair.ConsistencyChecker.<>c__DisplayClass2_0.<Check>b__0(String p) at MailClient.DbRepair.PerAccountExecutor.Execute(String dataStoreLocation, Func2 action)
at MailClient.DbRepair.ConsistencyChecker.Check(RepairMode mode, CancellationToken token)
at MailClient.DbRepair.CheckingProcess.Check(CancellationToken token)
Data:
ResourceName: MailClient.Storage.Mail.Data.DbMailRepository.consistency.sql
DatastoreLocation: E:\rayMail\eMClientFiles\


Looking at the sqllite Logs\sqlite.log, I see this:
08/02/2021 19:20:09 266 os_win.c:44458: (23) winRead(E:\eMClientFiles\f82dcdc6-4927-403d-9cee-bf32bea7237e\conversations.dat) - Data error (cyclic redundancy check).


I believe the conversations.dat is corrupt and/or I have a problem on the disk at that location. (I can’t even copy that file to a new drive, though I can move it around)


Things I’ve tried:
I’ve moved the file out of the emClient folder and restarted emClient
This created a new conversations.dat file
but now I’m missing all my folders where I organize my emails.

Please help, how do I get back my old emails?

Thank you.

martes 03 agosto 2021 :: 1653hrs (UTC +01:00)

Hi @mainray

A few questions before I can attempt to help you.

Have you been backing up eMC on a regular basis using the default action?
If you have been backing up, have you tried running restore to the last know working installation?
How do you normally exit eMC?
Since restarting eMC after you moved the DAT file have you had any issues on restart?
What OS are you running?
What version of eMC?
Is the eMC installation on an HDD or SSD?
Do you use POP, IMAP for your mail?

¡Saludos desde la soleada España!

Skybat

emc_forum@compucall.com

I have NOT been making backups :(… so nothing to restore
I am running on Windows 8.1 and a regular HDD. I use POP to download mail.
I normally just hit the windows ‘x’ button to close the application.

After restarting eMC, there was no issues… it recreated the conversations.dat file, but then all my local folders were gone.

Since my post, I actually ran chkdsk which fixed the original conversations.dat file, but copying that over to instead of the original conversations.dat file did not restore my local folders.

miércoles 04 agosto 2021 :: 1738hrs (UTC +01:00)

Hi @mainray

To show Local Folders:
Menu ->General ->Check Show Local Folders
NEXT
I suggest that you enable Backup:
Menu ->Backup ->Check Enable periodic backup ->Frequency (1day) ->Preserve last (5 backups) ->Apply & Save
ALSO
You don’t say the version of eMC you are running, you can see versios avaiable at:

It is also important that when closing eMC that you Exit the program before you close windows
To Exit:
Menu ->Exit
FINALLY
You will be able to substantially improve the perfoormance of eMC by upgrading to an SSD

¡Saludos desde la soleada España!

Skybat

emc_forum@compucall.com