Restore appdata\roaming but gmail keeps deleting everything once connected

Hello: This is an unusual issue. My friend uses Emclient with Gmail. She accidentally deleted all of her email and emptied her recycle bin. I’m not sure how she did this - logging into Gmail web interface there are no messages in “all mail” or in trash to recover, they are all gone. This in itself is unusual as you can normally recover gmail messages from trash or by looking in All Mail for messages that have no tags. But whatever, no problem, she uses backblaze to backup her computer, and we have the appdata\roaming\emclient folder backed up.

So I restored appdata\roaming\emclient and fire up emclient and everything is there as expected. However, immediately upon connecting to gmail, all messages are removed from the emclient cache (because gmail thinks they are supposed to be deleted).

So I pulled the Ethernet connection, copied the restored data back to appdata\roaming\emclient, and started emclient again. Now I can see all the messages, and since it can’t connect to gmail, everything is visible to look at. The messages are fully downloaded and everything is there as it should be.

I thought I would just copy all the messages to a local folder, then reconnect to gmail, let the sync occur so everyone is happy and all emails are removed from emclient to agree with the current state of the mailbox on gmail. Then I thought I could copy them back, or even just leave them in the local folder. But emclient will not let me copy any of the messages without connecting to the server. The moment I try to copy them, the dialog to connect to gmail appears. If I cancel, it also cancels the message copy. I’ve tried changing the password on the server too, but no matter what I do, It wants to connect to the server before I can copy the message. The full message is downloaded and I can see them all, I just cant copy them or export them or do anything without connecting to the server. And of course the instant I do that, the sync begins and all the messages are deleted from emclient’s local cache.

I need to either force gmail to forget all the message ID’s that were deleted, so that when emclient connects, they will be uploaded back to the server, or I need to figure out how to copy the messages from the emclient cache to another location without having to connect to the server first. Or I need to somehow change the message ID’s in the emclient database so that gmail will think they are new messages that need to be uploaded to the server instead of deleted from the emclient client.

Any thoughts on how I can save the messages from emclient without having to connect to gmail?


Have you tried using the eM Client backup function (How to do a Backup of eM Client data | eM Client) once you have the emails available, and then afterwards connect and let it remove the emails from eM Client, then afterwards restore the backup?

Give that a try and see if it works.

thank you, I did try that. Sorry I meant to include that info as well. After restoring the backup, google immediately deletes the messages as well.

I actually did a test with my emclient and gmail, and the backup feature is implemented in such a way that the moment it is restored and you begin a sync, the server will drive the mailbox to reflect the server. So there is no actual ability to restore an IMAP mailbox, as the message ID’s apparently remain the same, and the server will just do what it is supposed to do.

This seems to be a strange way to implement the backup/restore, because if the messages were on the server correctly, then all we would need to do is connect and sync. The fact that we need to do a restore from Emclient backup should make it obvious that the server does not have the desired data, and we therefore want the server to keep all the restored messages. So I would think that the restore would force the messageID to be recreated so they look like a new message to the server and will remain. I’m hoping someone will have a utility or a way to manually update the message-ID’s or some other workaround. Thanks for your suggestion though.

That is because the primary storage is the server. When eM Client (or any IMAP email application) connects to the server, whatever is displayed in the application is replaced by what is on the server. Just like webmail.

But there is a way to retrieve selected data from the backup:

  1. Disconnect the computer from the Internet. This is important!

  2. Go to Menu > Settings > General > Backup. Disable Periodic Backup if it is selected and click on OK.

  3. Make a backup using Menu > Backup, so we can come back to the current database later.

  4. Restore the old backup that has the data you want to retrieve.

  5. Export that data you need. You can do that using Menu > File > Export > Export email to eml files. You can select whole directory trees, so it is fairly easy to do.

  6. Restore the backup made in step 3.

  7. Reconnect to the Internet.

  8. Import the data from step 5 using Menu > File > Import > Email (eml).


Thanks, I understand the primary storage is the email server. The issue here is all the emails on the server have been deleted, but they still exist in the EMClient cache, and I would like to copy them out of EMClient to a local folder. I have disconnected the Ethernet connection, restored the EMClient folder in %appdata%\roaming, and all the messages are visible. They are fully downloaded and I can read the full contents and access attachments. However when I try to copy them to a local folder, or export them to .EML files, I get a dialog box that states the message is not fully downloaded. This is preventing me from copying the messages to another folder, or exporting them. Is there any way to update emclient so that it thinks the messages are fully downloaded so that I can copy them or export them? This is strange how I can see them in the interface, but I can’t copy or export anything.