A site for solving at least some of your technical problems...
A site for solving at least some of your technical problems...
I've always had to recreate my filters whenever I reinstalled Thunderbird on a new system. After a while, that's rather annoying to have to do that over and over again.
This time, my lost filters included hunders of rules (around 5 or 6 years of work). The only good thing about it: I can now decide to not reinstate some of the filters. After all, most of these good old filters were rather useless after so many years. Many of those emails, I really do not care about anymore. So it's going to be a big clean up.
That being said, it would be a lot easier to clean up by deleting entries (folders) that I don't want anymore instead of having to recreate all of those filters. Especially, it's extremly likely that I miss something along the way and it could be an important (email from a bank, an insurance, the state...)
So this time I finally looked around for a way to archive my filters. It's actually dead easy. That's a text file and you can just copy it. I'm using the snap version of Thunderbird (much easier/safer since it can get updated frequently, contrary to the debian packages that tend to be updated only across Ubuntu updates...)
As a result, your files are saved in your home directory under the snap/... folder.
/home/alexis/snap/thunderbird/common/.thunderbird/<unique-name>/ImapMail/mail.m2osw.com
Inside that folder you'll find a file named:
msgFilterRules.dat
That's your filters for that one account (mail.m2osw.com in my example).
So now all I have to do is implement a CRON which copies that file so I have backups litering my drives all over the place.
According to the source I've found, all you have to do is copy that file. Voilà. I'd suggest you close Thunderbird to overwrite the file with your backup and then restart Thunderbird. Otherwise, it may now work. To make a backup, however, just a simple "cp src dst" in the middle of the night will work just fine.