How do I backup Thunderbird mail and profile under Linux?

Q.I’m Ubuntu Linux user and I’d like to keep backup of my email and mail settings. How do I backup Thunderbird mail and profile under any Linux distribution?

A. Thunderbird is simple to use and powerful email client with following features:
=> Safe, fast, and easy email

=> Intelligent spam filters

=> Quick message search

=> Customizable views etc

Mozilla thunderbird stores your email and profile setting in a special directory called ~/.thunderbird i.e. /home/you/.thunderbird/ or ~/.thunderbird directory. All you have to do is backup this directory.

Task: Backup Thunderbird mail and profile

You need to backup thunderbird mail and profile to tape drive, use:
$ tar zcvf /dev/st0 /home/you/.mozilla-thunderbird/
To backup files to USP pen driver mounted at /media/disk, enter
$ cp -avr /home/you/.thunderbird/ /media/disk
You need to backup thunderbird mail and profile to a /backup directory:
# tar zcvf /backup/email-vivek-22jan2007.tar.gz /home/vivek/.thunderbird/

You can copy /backup/email-vivek-22jan2007.tar.gz file to a CD/DVD or USB pen.

Task: Restore Thunderbird mail and profile

Make sure Thunderbird is not running. Simply copy backup files from tape, USB pen or CD to your /home/you/.mozilla-thunderbird/ directory:
$ tar –zxvf /backup/email-vivek-22jan2007.tar.gz -C /home/vivek

Or just copy all files from USB pen/CD to ~/.thunderbird/ directory.

A note for Windows XP/2003/Vista User

MozBackup is a simple utility for creating backups of Mozilla Firefox, Mozilla Thunderbird, SeaMonkey, Mozilla Suite and Netscape profiles.

This program is freeware and works on Windows 98/ME/NT/2000/XP/2003 only. No Linux/UNIX version exists.

It allows you to backup and restore bookmarks, mail, contacts, history, extensions, cache etc. It’s an easy way to do Firefox backup, Thunderbird backup. You can download this software here.

You can also follow these instructions – Move an existing profile or restore a backed up profile for Windows.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 16 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
16 comments… add one
  • zerogrounding Mar 15, 2007 @ 3:57

    Great How to,,
    thank you very much,,
    God bless you

  • rocky Mar 16, 2007 @ 8:41

    Same here thanks for sharing nice stuff
    God bless you :D

  • sting Aug 28, 2007 @ 11:35

    Thanks so much! you have saved me so much hair pulling!

  • john Apr 15, 2008 @ 14:00

    Sorry, but I did that and still doesn’t work. It shows instantly my restored email messages and then they disappear.

    There are 2 profiles of course, the restored one xxx.default and the new one zzz.default which is empty.

    Should I copy the contents of xxx.default to zzz.default or it is able to recognize the new profiles?

    I copied from a Gentoo linux machine to a FreeBSD one.

    Thanx for your reply…

  • passerby Apr 26, 2008 @ 17:53

    how to: backup on windows – restore same on linux

    emigrate thunderbird from windows to linux

  • Lars Nov 13, 2008 @ 11:02


    Sorry, but don’t work on truecrypt-media!

    Anyone have adds?

  • PenguinUsr Feb 15, 2009 @ 0:45

    Re: FireFox backup

    FEBE!! Open your Firefox Browser > Tools > Add-ons > Get Add-ons > Browse all add-ons > in the Search Box type: FEBE or Google: Firefox FEBE


  • e huehns Mar 12, 2010 @ 19:23

    I use Ubuntu 9.04 and want to back up my email files in Thunderbird. I’ve read the above instructions but they are meaningless to me. If I knew where to type them in I expect they would work. I need instructions right from the beginning what to do when I look at the ubuntu desk top.

  • alan abbott Mar 15, 2010 @ 13:20

    I want to pass my mail files from one machine to another.
    I tried:
    alan@AlanUbu:~$ tar zcvf /Documents/email-alan-15mar2010.tar.gz /home/alan/.mozilla-thunderbird/
    tar: /Documents/email-alan-15mar2010.tar.gz: Cannot open: No such file or directory
    tar: Error is not recoverable: exiting now
    tar: Removing leading `/’ from member names

    What am I doing wrong?

    • arif Apr 13, 2010 @ 13:12

      Alan you have to write full path :

      try this :
      tar zcvf /home/alan/Documents/email-alan-15mar2010.tar.gz /home/alan/.mozilla-thunderbird/

  • Mike Aug 10, 2010 @ 14:06

    backup to tape drive? that’s cool
    who still does that :)

  • Dave May 28, 2011 @ 18:06

    Good instructions, been looking for something like this for a long time. Thanks.

  • Viktor Jun 10, 2011 @ 20:54


  • amit Jul 5, 2013 @ 6:06

    how can i store my all mails of thunderbird in to my system…..iwant to save all mails sapretly

  • amit Jul 5, 2013 @ 6:07

    try to give me graphical method in linux

  • Earl Aug 8, 2016 @ 13:30

    Thunderbird Archive files are stored elsewhere on the disk.
    Where, and why? I have no Idea.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum