Page 1 of 1

How to backup Thunderbird and all emails

PostPosted: Jun 26th, '18, 03:09
by xboxboy
I would like to backup Thunderbird and all my business emails.

I would then like to store it off the pc, so I have a backup in the true sense, but I would also like to confirm that the backup works in a VM so I can access them at a latter date if needed.

Any help most appreciated. TIA.

Re: How to backup Thunderbird and all emails

PostPosted: Jun 26th, '18, 10:19
by Plisgyn2
I usually backup the /home/user/.thunderbird directory which contains xxxxxxx.default file, I have used this file to copy between Mageia and Windows 10.

Re: How to backup Thunderbird and all emails

PostPosted: Jun 27th, '18, 21:12
by JoesCat
Hi xboxboy,
I don't use Thunderbird myself, but believe .Thunderbird is one folder you want to copy, and then another file or folder is/are usually located elsewhere, especially if you specified another location when you installed.
Looking here: https://askubuntu.com/questions/114015/ ... ird-emails explains the other location(s) where the actual files/emails are located.... which has jumbled name.default. If it is also inside the .Thunderbird folder, it keeps it simple for you.

I usually need to backup/nuke/restore these files, so look for the other folder(s) too.
I mention folders, if you happen to have more than one email account, or tend to separate email per account.
Another point to keep in mind is if any of the files are equal to or larger than 2GB in size, this is ok with ext file format, but may not be okay with some other file formats (example some USB sticks as vFAT, where you also lose ownership and permission info - if this is the case, tar the files to preserve ownership/permissions).

Re: How to backup Thunderbird and all emails

PostPosted: Aug 9th, '18, 12:11
by xboxboy
Thanks guys, Thunderbird is now complaining about wanting to compact the inbox all the time.

So I checked that path folder, and it is the folder you both mention in ~/.thunderbird

This is what I've done:
Code: Select all
rsync -avx .thunderbird/ thunderbird.bak/


That should copy it retaining all permissions correct?

Re: How to backup Thunderbird and all emails

PostPosted: Aug 9th, '18, 14:19
by doktor5000
xboxboy wrote:Thanks guys, Thunderbird is now complaining about wanting to compact the inbox all the time.

Now relates to what? Is that after you imported the backup? Was thunderbird running when you took the backup?

xboxboy wrote:That should copy it retaining all permissions correct?

Yes. Although why would you want to copy the backup to the same base folder?

Re: How to backup Thunderbird and all emails

PostPosted: Aug 10th, '18, 01:04
by xboxboy
Sorry, by 'now' I mean recently. I think an update has started this warning, but, after googling about it, compacting appears to be something that should be done: Hence the kick a long to actually do a backup, before attempting to compact.

I just made the copy into my ~ folder:
A: Just wanted a back up in compacting it caused a problem
B: I regularly take backups of /home, so it will be backed up offsite

So the main reason for just backing up thunderbird on it's own was so
A: I have a copy I can view at a later time if needed
B: I can safely attempt this compacting that I haven't been doing.

Re: How to backup Thunderbird and all emails

PostPosted: Aug 10th, '18, 12:00
by jkerr82508
You can control how thunderbird offers to compact folders:
Preferences - Advanced - Network & Disc Space

Jim

Re: How to backup Thunderbird and all emails

PostPosted: Aug 10th, '18, 12:47
by doktor5000

Re: How to backup Thunderbird and all emails

PostPosted: Aug 11th, '18, 07:41
by JoesCat
Sorry, by 'now' I mean recently. I think an update has started this warning, but, after googling about it, compacting appears to be something that should be done: Hence the kick a long to actually do a backup, before attempting to compact.


It probably wasn't an update, but more likely one or more folder file(s) was 20%+ full of "marked for delete" messages and it was time to clean-house, so it was likely a coincidence.

I think (in Thunderbird), if you right-mouse-click each folder, you can compact them one at a time to compact the mailbox file(s). Do this for all folders... inbox/sent/trash/etc.... If you open a cmd prompt and "ls -la" the folder, you'll see before/after file size cleanup reductions after compacting.

"Compacting" is something that needs to be done every now and then if mail is stored in mbox format.
I think mbox is easier to recover than individual files (maildir).

2 mbox gotchas that you need to be aware of are... make sure you have enough space to create a compacted file, so if your current inbox is 2GB, you should have 2GB of free space to create a new/compact file (and then the old file is deleted).
gotcha #2 is watch-out that your mbox file does not get too large. If you receive lots of pictures and videos, your inbox can quickly climb up to 2GB+ in size. Some file systems cannot handle files larger than 2GB in size. Some programs cannot handle files 2GB+ in size. Thunderbird is (or was until recently) a program that has 2GB file-size limit, example: https://bugzilla.mozilla.org/show_bug.cgi?id=215450

Re: How to backup Thunderbird and all emails

PostPosted: Aug 12th, '18, 00:11
by doktor5000
JoesCat wrote:Some programs cannot handle files 2GB+ in size. Thunderbird is (or was until recently) a program that has 2GB file-size limit, example: https://bugzilla.mozilla.org/show_bug.cgi?id=215450

Until recently being 7 years ago?

Re: How to backup Thunderbird and all emails

PostPosted: Aug 13th, '18, 18:22
by JoesCat
Thanks for the pointer,
I was somewhat sure it was something more recent.... tried looking for a posting myself, but didn't find it.
Seems problems are resolved at 51 and newer:
https://bugzilla.mozilla.org/show_bug.cgi?id=789679
...but even then, there are some users running into issues:
https://bugzilla.mozilla.org/show_bug.cgi?id=1343508
...and the problem I ran into was a win10 machine, not Mageia, so what happens on one OS might not necessarily happen on another.

...my suggestion (as a precaution) is if you have a mailbox reaching 2gb, it may be worth breaking it down to avoid possible problems, eg:
inbox
inbox2017
inbox2016
inbox2015
...or however you think is best

This is a fairly good bit of info: http://kb.mozillazine.org/Limits_%28Thunderbird%29