Can't revert deleted inbox

Hello,
For some reason yesterday apparently K9 deleted the inbox back to July 12th on the mobile (Android).
Luckily not completely but shifting the content to trash.
Now I would like to shift the complete trash back to the inbox but K9 is telling I can’t do it because the items are not synced with the server.
Indeed while about five months went to trash on the mobile only about three months are missing on the server.
How can I copy the items from the mobile phone trash back to the inbox?
Interestingly K9 is still out of sync with the inbox.