How can I force a database check/rebuild?

When eM Client is not shut down properly, it offers to check/rebuild the database on the first restart. That often takes forever, so I need to abort that. However, when I have time later, I’d like to have it conduct the database check. How can I manually trigger that? Searching in the help file for “database” “rebuild” did not produce any topics, so I post anew.

DON’T.

You can render the database irrevocably unusable. Then you will need to delete it and start again with an empty database. That can take a lot longer to setup again and resync, and you will lose any local data. If there is a database error, it will run automatically, so let it run.

The option is there so you can cancel if it runs repeatedly and can’t repair, or you want to cancel it, delete the database, and restore a backup.

Don’t do what? Try to force a database check? Cancel the database check when it runs?

When eM Client is not shut down properly, it offers to check/rebuild the database on the first restart. That often takes forever, so I need to abort that.

As @Gary advised, Don’t skip / cancel the database check on startup or you could risk rendering the database unusable and loose everything.

So if this is happening alot when you first open eM Client and it’s not automatically being repaired, then you can either restore an eM Client backup prior to when this started happening via “Menu / File / Restore” or Remove and Readd the accounts as new if you have no prior backup.

How long should a database rebuild take? I’m about an hour in and its still checking mail_index.dat

How long should a database rebuild take? I’m about an hour in and its still checking mail_index.dat

We don’t know how long the database repair will take to complete. To be going for an hour though sounds like your database is very large and has a lot of problems. You will just have to leave it go till it finishes or it may not work again.

Then once you get back in, make a backup either manually via “Menu / Backup” or setup Automatic periodic backups (if you don’t already) via “Menu / Settings (Preferences-Mac) / General / Backup”.

Now if the repair doesn’t complete (normally it does) and you can’t get back into eM Client, then you will have to “rename the hidden database folder” to eg: eM Client-Old, and then open eM Client and either setup as new or skip the setup and restore an eM Client working backup.

(Windows hidden eM Client database folder)
“Users\yourusername\AppData\Roaming\eM Client”

(Mac Hidden hidden eM Client database folder)
“Users\yourusername\Library\Application Support\eM Client”

Lastly check to that you are using the latest version of eM Client for whatever version you currently have. As you might possibly be using an outdated or older version that needs an update. There has been alot of fixes & updates in the last few months.

Also if you do update to a later version, close eM Client before updating.

You can see and download all the various versions via the release history page.

It’s definitely very, very, large database. Resolved successfully reporting no errors after about 75 minutes.

I understand from reading above, that bypassing the database check is not a good idea.

For reasons that I can’t change, my laptop often has eM Client open and is sitting idle until it runs out of power. No mail has been sent, although mail might be received.

When the laptop is later charged back up and reboots, running eM Client always requires the “database check.”

Obviously the best scenario would be to not have eM Client open when the laptop runs out of battery power. But under this specific scenario, would it be dangerous to not let the database rebuild each time?

I don’t know anything about databases, so I’m just wondering whether power failure this is a benign situation that might not require a rebuild?

For reasons that I can’t change, my laptop often has eM Client open and is sitting idle until it runs out of power. No mail has been sent, although mail might be received.

When the laptop is later charged back up and reboots, running eM Client always requires the “database check.

Yes if you leave it open and it runs out of power and the laptop turns off “it will normally corrupt the database” as it’s still resident in memory.

You need to manually close eM Client before the computer runs out of power. Or shutdown in Sleep mode “before it runs out of power”.

Alt if the laptop has to be left on 24hr, then suggest to leave the power cord permanently connected so it doesn’t run out of power.

I think emClient should periodically flush the database to disk (in the background).
Then this situation could be avoided. By periodically, I mean it could flush after receiving and sending email, should be quite easy to implement.

eMClient should persist checking the database until it’s done.
IOW, if the user cancels it should recheck every time you open the app until it’s done.

It will run until it fixes the database and then eM Client will open, or until it can’t and then it will display an error.

As I said before, the option is there so you can cancel if it runs repeatedly and can’t repair, or you want to cancel it, delete the database, and restore a backup.