Problem restoring from archive backup

I had to install a new hard drive on my computer, so I’m reloading all my apps…

I reloaded eM Client and all its database files which I had backed up. All my emails are there, but I am unable to see or restore any of my archived emails.

I tried to run a restore from the eM Client backup but I get the messages

System.IO.IOException: Access to the path ‘C:\Users\Admin\Documents\eM Client’ is denied.
   at System.IO.Directory.InternalMove(String sourceDirName, String destDirName, Boolean checkHost)
   at DbBackup.FormBackup.Restore(String backupFile, CancellationToken cancellationToken)
   at DbBackup.FormBackup.Restore(CancellationToken cancellationToken)
   at DbBackup.FormBackup.<>c__DisplayClass28_0.<mainform_load>b__0(Object a, DoWorkEventArgs b)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

So I assume I somehow have to give eM Client access to that file. I tried running eM Client as Admin but that didn’t help. I also moved the entire database to a non-admin folder but that didn’t help either.

Can anyone help please? I use this for business and I really need all those archived emails.

Thanks,
Simon</mainform_load>

Restart Windows.

Then without starting eM Client, open a Command Prompt, then type the following commands:

          cd C:\Program Files (x86)\eM Client

           dbbackup -restore

See if that works.

Hi Gary, and thanks for the suggestion. I did as you said, and it still fails with the following error messages. It says it can’t find the backup zip file, even though I can see it in the directory! Do you have any other suggestions please? Is it because this is an admin file location?

Cheers,
Simon

System.IO.FileNotFoundException: Could not find file ‘C:\Users\Admin\Documents\eM Client\backup_201909241343.zip’.
File name: ‘C:\Users\Admin\Documents\eM Client\backup_201909241343.zip’
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileInfo.get_Length()
   at DbBackup.FormBackup.Restore(String backupFile, CancellationToken cancellationToken)
   at DbBackup.FormBackup.Restore(CancellationToken cancellationToken)
   at DbBackup.FormBackup.<>c__DisplayClass28_0.<mainform_load>b__0(Object a, DoWorkEventArgs b)
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)
</mainform_load>

Another thought - since I reinstalled eM Client, I have left the backup function switched off. Could that affect its willingness to perform the restore…? Cheers, Simon

I see in another thread https://forum.emclient.com/emclient/topics/problem-restoring-from-backup that someone suggested unzipping the backup files and then importing them as (presumably?) the current email files. I assume that if I were to do this then eM Client would subsequently redownload all newer emails from the server…??

What you can try is the following:

  1. Close eM Client and unzip the previous backup file you are wanting to restore.

  2. Move the C:\Users\username\AppData\Roaming\eM Client\ folder from the unzipped data to the same location on your hard disk, replacing all files when prompted. 

  3. Restart eM Client.

  4. If you had setup eM Client to use a different location for the database, go to Menu > Tools > Settings > General > Storage, and set the location where you moved the data to in step 2.

  5. Restart eM Client.

It worked!! Thanks very much Gary, I was getting a bit worried about losing all my old email!! I’m having second thoughts about the Archive feature if this is the risk…!!

Cheers,
Simon