Office 365 - Thunderbird - Backing up and restoring a profile/email
In Thunderbird, the Profile folder contains locally stored mail, preferences and settings, extensions, etc. If you have important emails saved locally, you are strongly encouraged to backup your profiles regularly to prevent loss of data.
Steps are given specifically for backing up IMAP mail locally, follow MozillaZine KB's IMAP Backup instructions.
Additional information about backing up and restoring Profiles in Thunderbird can be found in http://kb.mozillazine.org/Profile_backup.