Em Client auto-shutdown and auto-start

I understand the issues with backing up the EMC database with an external backup product (in my case, iDrive) while EMC is “up”, so I’m looking at alternatives.

Is there a way to shut down and start up EMC at a specified time every day? Here’s what I would like to have happen…

  1. At 2AM every morning, shut down EMC.
  2. At 3AM every morning, run iDrive backup to back up EMC database (or whatever needs to be backed up).
  3. At 4AM every morning, restart EMC.

Would the above backup plan work if EMC can be shut down and restarted at specified times?

Thanks,
JL

Why don’t you just use eM Client’s own periodic backup? eM Client doesn’t need to close for that to happen, nor does it even need to be running.

1 Like

Several reasons…

  1. I would rather have a single backup strategy for all my data. Easier to administer that way.

  2. I want that strategy to save the backups onsite and offsite.

  3. I prefer incremental backups. With the EMC backup, it looks like every backup will be at least 3.5GB. With incremental backups, the initial full copy will take 3.5GB (assuming the same data compression results), but subsequent incremental backups will each take a small fraction of that amount.

  4. Due to the smaller sizes of the incremental backups, I can save a lot more of them.

You can’t make incremental backups of the eM Client database. It needs to be a complete snapshot or nothing.

That is because the files in the database are not individually changeable. In some instances it may work, like with settings or templates, but mostly if you try to restore individual files from an incremental backup, and insert them into another database or part of a database from another backup, ALL the data will be lost.

Yep i also agree with @Gary best to do Periodic backups. I personally set mine to back up every day and keep the last 3 backups.

1 Like

I think my original post was a little confusing. Instead of “backing up the EMC database”, I should have said “backing up the EMC folder”, with “folder” implying all of the data files associated with EMC.

Assume iDrive (or Carbonite, or whatever) took a full backup of the EMC folder (i.e., all data files related to EMC) on Sep 1, then an incremental backup of the folder every day since then, and EMC was not running during the time the backups were being done. I decide to restore the EMC folder to what it looked like on Sep 15. When the restore is complete, all of the files in the EMC folder, regardless of their contents, will look identical to the files in the EMC folder as of the time the Sep 15 incremental backup was complete. As long as EMC is not running while the backups were being taken or when the folder was being restored, the restored folder will be a consistent, point-in-time snapshot of the entire EMC folder.

I agree that if EMC is updating one or more files in its folder while the backups are being done, the resulting backups can be inconsistent and may corrupt the EMC files. That’s why I want to shut EMC down while the backups are being done.

I appreciate the concerns/replies, and I had read similar replies to similar posts on the forum before I posted my question. That’s why my post didn’t ask how to use an external backup product, and instead asked if there was a way to stop/start EMC at specific times.

Thanks,
JL

You can use an external backup option, but only if eM Client is not running. And, it needs to be a full snapshot of the database folder. You can’t make incremental backups.

How you shutdown eM Client will be tricky, because if it is not correctly shutdown, the data may be compromised in your external backup.

The built-in back first makes a shadow copy of the database, and then optimises and checks the data before compressing it. This backup function will run irrespective of whether eM Client is running or not.

1 Like

Can we agree to disagree on whether or not an incremental backup will work, and get back to my original question of “is there a way to automatically/gracefully stop then start EMC at specified times?”? I agree that canceling the EMC task very likely will not result in a graceful shutdown. Many applications have a command line interface that allow for graceful shutdowns, so those applications can be gracefully shut down via task scheduler running a script, for example.

Another question, which may allow for me to use the external backup… it looks like EMC backups result in a zip file named backup_yyyymmddhhmm. Is there a way to have the backup file be created without a date/time stamp? I understand that the file may need to be deleted before the next EMC backup is done if the EMC backup cannot tolerate duplicate file names for the backups.

Can we agree to disagree on whether or not an incremental backup will work.

As @Gary already advised “you cannot do incremental backups”. You allways need to do complete snapshots of the complete database folder". There is no incremental backup option.

“is there a way to automatically/gracefully stop then start EMC at specified times?

No you have to manually close & re-open the program at the times you want. There is no option in the program to do that.

Also if you automatically shutdown eM Client via a script (while the program is open), you would more than likely risk corrupting the database and would get the “checking for database errors” when eM Client reopens as normally happens if you force close the program while open.

Is there a way to have the backup file be created without a date/time stamp?

No they are all automatically dated and time stamped and no option in the program to remove that.

However you can change the date and time stamp manually (after they are created) in the backup folder.

No disrespect intended, but I think my understanding of incremental backups (as they are done with iDrive, etc.) is different than you guys.

So let’s keep this simple. Assume all of the EMC files, databases, etc. are kept in the same folder, and they are all successfully closed by EMC when it is gracefully shut down. At that point in time and until EMC is restarted, all of the files are individually consistent and consistent in relationship to all the other files in the folder. If, at this time, I take a full backup of all the files in the folder (using iDrive), and subsequently restore all the files in the folder, all the files will be bit for bit identical to the original files at the time the folder was backed up. Do we agree on that?

Now fast forward three days, during which time each night, EMC was gracefully shut down, and while it was shut down, incremental backups were taken of all the files in the folder by iDrive. After the third incremental backup, a problem happens that make me decide I need to restore the EMC files. I shut down EMC. While EMC is shut down, I do an iDrive restore for all of the files in the EMC folder, as of the last incremental backup (which I assume was taken before the problem happened). iDrive first restores the original full backup, then it restores the three incremental backups “on top of the full restore” in the order they were created. At that point, I contend that the EMC files are bit for bit identical to the EMC files as they were when EMC was gracefully shut down right before taking the third incremental backup, so EMC should be happy with the restored files. Do you guys agree with that? If not, please explain why.

I guess it’s a moot point if EMC doesn’t have the ability to be gracefully shut down via something like task scheduler.

iDrive first restores the original full backup, then it restores the three incremental backups “on top of the full restore” in the order they were created

I personally wouldn’t do that as sounds risky restoring it back that way if something happens.

You are far better in my opinion to do the proper eM Client periodic backup.zip files and then automatically backup that folder daily to your iDrive. I do exactly that daily to my Google Drive.

As I mentioned above, just set eM Client to keep the last eg: 3 periodic automatic backups so you then don’t take up alot of space on iDrive.

This could explain why I need to repair eMc so frequently. I periodically ask windows to reboot or shut down and windows shuts down most programs gracefully without corruption. Is there a way to have eMC shut down correctly at the same time? It worked with other email clients.

It also means that I cannot have my laptop shut down by just closing the lid or after x hours of idle time.

Having said that, I know i shut down eMC correctly last night and it still took 45 minutes to restart this morning which seriously messed up my team meeting at 8:30 (which I have every day). I guess I need to come to work 45 mins early to start eMC.

Thomas

@Thos

Is there a way to have eMC shut down correctly at the same time? It worked with other email clients.

No you allways have to close eM Client manually before shutting down your computer or putting it too sleep to avoid any database errors.

I know i shut down eMC correctly last night and it still took 45 minutes to restart this morning which seriously messed up my team meeting at 8:30 (which I have every day).

If eM Client is taking 45mins to open and you are manually closing the program before shutting down your OS or putting it to sleep, then it’s definitely got some sort of corrupted database as that is not normal for eM Client. So If you have an IMAP, Exchange or iCloud account I would suggest to remove and re-add your account or accounts & that should normally fix it.

I came from Outlook and The Bat and really like some of the features I have found in eMC such as the calendar integration and so on. All I want is for an even more stable and robust experience. This program could be really really great if this (and a couple of other rough edges like boolean filtering and auto duplicate removal) could be improved in later versions. I have bought a license and plan to buy 4 more for my employees.

There is one action that causes EmC to crash (and needing a 45min repair). If I right click on an email address in an email header and select “write mail” it opens a new editor window so that I can write an email to that address, and if I move this window to another desktop monitor EmC crashes. I have managed to repeat this a number of painful times as it costs me 45 mins each time. In fact I am sitting waiting for the repair to finish right now which has given me time to write this post.

“If you have an IMAP, Exchange or iCloud account I would suggest to remove and re-add your account or accounts & that should normally fix it” - I mainly use POP mail. I would loose all my emails sitting in those accounts (I have ported around 300,000 emails to EmC). Why does repairing the database not fix the problem? I have 5 accounts in eMC now and plan to add more.

I could reinstall windows for sure, but as EmC is the only program that causes me trouble (other than Teams of course) I am reluctant to go though the lengthy exercise.

I am really hoping to see these improvement in future versions and this will become a killer application.

Do not misunderstand me. I have been using EmC for only a few weeks and am still on a learning curve. I think the program could become my go to app for email if some of the workflow irritation can be addressed.

(I have ported around 300,000 emails to EmC). Why does repairing the database not fix the problem? I have 5 accounts in eMC now and plan to add more.

As you have the Pro version of eM Client, I would then “contact eM Client VIP support” for help on both those issues via the “Pro / Enterprise” support page. Include your eM Client version number and also your Windows or Mac OS version - Support | Remote Assistance | License Manager | eM Client.

Are you using Windows 10 or 11? If using Windows 11, have you tried updating to the recently released 2H22 and trying again to move the window to another desktop monitor?

Thanks lancelot. I will try to update my Win11. Maybe this will work.

Updated windows and problem still occurs. eMC just crashed again while replying to an email. This is time I opened an email and pressed "reply"before it fully opened. The emal never fully opened nor did a reply editor window. The program froze and after a while simply closed. I am now having to wait 45 mins for it to start again. I do not have 45 mins… Work does not wait for 45mins Aghhhh

If it crashes with Windows 11 and you don’t get a crash report popup, then it is most likely the Windows 11 UI automation bug. You can run eM Client in Windows 8 compatibility mode until Microsoft can fix the bug.

If he upgraded to recently released 2H22 as he said he did, shouldn’t the Windows 11 UI automation bug have been fixed in that version?