Saving and restoring Favorites and delegated accounts

To fix an issue, I deleted my database, after first saving settings and all accounts. When I restored it, I noticed that the Favorites had reset to the default. Should it have been possible to save and restore them?
I also noticed that one calendar didn’t get restored. This is an Exchange calendar for my wife on the same domain as mine. I added it back easily enough by adding permission for myself to access her account (Account → Properties → Delegation), but I was confused at first that I couldn’t see it anywhere. So it seems that this property of an account is either not exported or not imported.

To fix an issue, I deleted my database, after first saving settings and all accounts. When I restored it, I noticed that the Favorites had reset to the default.

eM Client will restore everything exactly as it was “when you use the built-in backup and restore”, via either the automatic periodic backup in “Menu / Settings (Preferences) / General / Backup” or manually via “Menu / Backup”.

So as you manually exported the settings and accounts and then deleted the old database to fix a problem, “and not used a previous eM Client backup when it was working ok”, then that would explain why the Favourites were missing.

So best to allways “regularly backup” using the built-in backup, so if you do have database problems in the future, you can just easily restore via “Menu / File / Restore” & everything will then all come back as it was.

Thanks

So what does the backup actually back up? Given I deleted the database to fix an issue, wouldn’t restoring simply restore the possibly corrupt database?

I have periodic backup set to run every two weeks. However, it says that the most recent backup was 07/03/2024. Whether that’s March (as I would read it) or July (if it’s US format), that’s more than two weeks.

So what does the backup actually back up.

The backup automatically “backs up everything in eM Client” at the time that it runs. I recommend to backup daily and “keep at least the last 3 dated backups”. Also copy those backup.zip files regularly to & external drive or cloud drive incase you need to restore for any reason.

So If you then all of a sudden notice something wrong with the database that was ok the day before or previous 2-3 days, then you can easily restore your dated backups and be back up and running quickly with everything still the same.

Now if the database got corrupted in some way since the automatic backup ran last, then the automatic backup “may not run” which might then explain why it stopped previously in March or July. I don’t know if eM Client will still automatically backup if it does get corrupted.

The only thing I know that happened around July was the official eM Client V10 release.

I have periodic backup set to run every two weeks. However, it says that the most recent backup was 07/03/2024

I would go to “Menu / Settings (Preferences) / General / Backup” and first see if thats still enabled in your current eM Client. If its already enabled, try then disabling it and re-enabling it and save settings. Then check in a day or so and see if the automatic periodic backup.zip files are appearing in the backup folder location.

Now if everything was working ok in March or July and you haven’t changed your Accounts or Favourites or Tags etc since then, and you have an IMAP, Exchange, Office 365 or iCloud (non POP) account and nothing normally stored in Local folders, then you could just try restoring that March or July backup, and then “any new messages etc since that time will update from your server when eM Client syncs” and all your usual favourites, tags, accounts etc will come back as they were at that time.

I’ve personally restored old dated backups for testing purposes many times & it worked fine.

Note: if you do try restoring that March or July backup, “make a new manual backup first” via “Menu / Backup” just incase that previous dated backup has any issues and you have to then restore your current version. You can see when the backup is complete in Show Operations via clicking the drop-down on the right of Refresh.

Interesting, I unchecked “Enable periodic backup” and clicked Save & Close on Settings. I got a message
“Unable to create backup task due to error:
Access is denied (0x80070005 (E_ACCESSDENIED))”

The same happened when I went back in and checked the box. So the question arises - what am I being denied access to? I have checked the folder where backups are stored (turns out the most recent is July) and I am the Owner with full access. I also checked access to the existing backups and again I am the Owner with full access.

That sounds like the backup folder location permission problem.

Try setting the default backup location to your boot drive user profile “Documents / eM Client” location and test first before opening eM Client “that you can create a file and delete the file” in that Documents / eM Client folder.

If you are already doing that “and have set the same location in eM Client” to that folder, then try for a test creating “a different backup folder location” on your boot drive and set eM Client to that folder location in Settings and see it it will then backup.

If it will then backup to another folder on your boot drive, but not the default Documents / eM Client folder, then delete the Documents / eM Client folder and re-create it and see it will then backup.

Permissions was the first thing I thought of, which is why I checked them all thoroughly and there is nothing to prevent me writing to the backup folder - I have full control and ownership. I created a new file in that folder with no problems. I set the backup folder to a different location where I also checked all the permissions and ownership and checked I could create a file. I could write to that folder directly, but I got the same access is denied error from eM Client. In case it made a difference, the original location is on OneDrive, the new one is just on the boot disk.
I wonder if eM Client creates the backup in a different location, then zips it into the specified directory? That could explain what I am seeing.

Did another check and the way Backup works is by setting up a Task in Windows Task Scheduler. When I looked in Task Scheduler, I found I could not delete the task if I ran it as myself but using UAC to input an Admin password. When I ran it as Administrator, I could delete the task, so I closed down em Client and deleted the task. The I opened eM CLient again and tried to set up Backup. This time, I got the following error:
image
I’m wondering if anyone is managing to backup successfully, as this seems as if it is in the program itself. As backup is failing silently for me, I would not have known had I not gone into settings to check.
Edited to add I am able to run a Backup manually.

Yes eM Client automatic periodic backup normally needs to be set to a local drive folder and not cloud drives, otherwise nothing normally backsup when I’ve tried doing that in the past.

So I think the automatic periodic backup was designed to be only set to local internal drives or external drives physically attached, due to cloud drives eg: may not always be available especially when you first boot up your computer and the cloud drives can then take a few secs to connect.

When I ran it as Administrator, I could delete the task, so I closed down em Client and deleted the task. The I opened eM CLient again and tried to set up Backup. This time, I got the following error:

If you have deleted the eM Client scheduled task, you will either have to manually recreate the task and set the task for whatever time to backup. Then try rebooting your computer and see if it then works when you reopen eM Client.

Or if you can’t recreate the task manually, Or recreating the task manually doesn’t work, then delete the task again and uninstall eM Client and if you have Windows “don’t delete the database when asked on the uninstall wizard”, and then reboot your computer and reinstall eM Client which should then resetup the task in the OS. Then reboot again and see if the backup works.

OK, I think I have found the issue, and it might point to a bug.
When I tried to re-create the scheduled backup within eM Client, it did actually create the task in the scheduler. However, what it created was, in Properties → Actions → Edit:
Program/Script: C:\Program Files
Add arguments (Optional): (x86)\eM Client\MailClient.exe/dbbackup -backup -silence

Not surprisingly, when I tried to run this, it failed. So I changed it to
Program/Script: “C:\Program Files (x86)\eM Client\MailClient.exe”
Add arguments (Optional):/dbbackup -backup -silence

and that runs on demand. The next scheduled run is tomorrow, so I’ll find out if it works.

The bug, if it is, is in eM Client setting the wrong values in the task - to me it looks like it may be by not using quote marks

All seems to be working OK once I fixed the error in the task definition