For the record Thunderbird's IMAP sync is not a reliable backup mechanism by itself. If many emails are deleted from your account, Thunderbird will sync (and delete your files locally) before you have the opportunity to copy them off somewhere safe. I know this from deleting all my mails off my gmail account (to make an encrypted archive) and trying to use TB as a reliable storage method -- since I had just taken a backup of my TB directory I didn't lose any mail, but it should be emphasized that TB with IMAP sync is
not a backup mechanism.
However, there are some great TB extensions that will allow you to export your mail into a reasonable, portable format every so often. I use ImportExportTools to export my mailbox to an mbox file and store that file securely. I can use this file to reimport to Thunderbird or any other mail client, or even to read some mail directly. :)