4th July 2021

Doing a backup of a thunderbird profile

The first step is to locate the profile that you are using in Thunderbird. In Thunderbird, click on the Help menu, then More troubleshooting information: under Profile Directory a button Open Directory will show the right location. In my case, using snap, this looks as:


A complete backup of Thunderbird implies copying this folder, but, depending on your mailboxes, this can be rather large. If all your mail accounts are IMAP accounts, the messages exist on the remote server, and it is enough to backup the settings. Creating on a new computer a new profile with these settings would effectively provide you with a copy of the original configuration.

To copy just the profile, this site lists the files that must be copied. However, it seems a bit outdated, and I use usually just backup the following files (discarding currently *.mab user.js persdict.dat):

tar zcvf ~/thunder.tgz prefs.js cert9.db key4.db logins.json

To restore a full backup, the official way would be unzipping it under the .thunderbird folder (likely on a new PC), and then starting the profile manager:

thunderbird -profilemanager

Create here a new profile, checking the box 'Use the selected profile without asking at startup', press Continue to enter any profile name of your choice, and press the 'Choose Folder' button to select the folder you just unzipped.

In the case that you are setting up Thunderbird anew (again, likely on a new PC), the alternative is to just find the default profile directory, as detailed above, delete its content, and unzip directly the backed up files into that folder.