Mails vanished while moving emails from imap folder on one server to imap folder on another

Was starting to migrate from mail.de to Gmail.

Started looking good, was able to migrate one folder. Then chose several other folders, marked all mails and moved them to the imap folders on the gmail.

As upload is very slow here, waited for perhaps 45 minutes, as again and again the message “your mails are uploaded” was shown.

Then there was a connection error message, and all the imap folders that had started to fill were suddenly empty.

I restarted the programme - the mails have vanished. And on the gmail server, accessed on the internet, not even a trace of the mails, neither.

Please explain.

Are the messages still on mail.de?

Are the messages in the Gmail All Mail folder?