5

Is there a terminal-command that backups thunderbird's addressbook?

I would like to set up a cron-entry for that. Note that I only want to back up the address book, not my entire profile.

2 Answers 2

5

Mozilla Address Book .mab

Backing up your address books GUI

It is recommended that you regularly make backups of all your Thunderbird application data, including mail files, address books, and account settings, so that you can restore your complete profile(s) if it becomes necessary.

In addition, you may want to occasionally make separate backups of all your address books by exporting them as LDIF files. That way, if your address books ever happen to become corrupted, you will still have a separate backup that you can import into any Thunderbird profile. To do so, export each address book as an LDIF file using the procedure described above and then burn the LDIF files onto a CD-ROM or store them elsewhere for safekeeping.

To export an address book:

 - Open Thunderbird > Tools - Address Book

* In the Address Book window, select the address book that you want to export.
* Go to the "Tools" menu and select "Export...".
* Enter a name for the address book, select "LDIF" from the drop-down list, choose where on your computer you want to save the address book, and then click to save the file. 

Backing up your address books Command-Line

Your address book in stored in your profile to know where is it execute :

sudo locate *.mab -> find something like abook.mab

3

Yo could use a bash script. Check this link. There is a script provided that backups your thunderbird directory. This folder should also include your adress book. The author also provides instructions how to setup this script as a cron.

Note: the script backups your complete folder. You should customize this line

tar zcf thunderb-mail-${x}.tgz ~roger/.thunderbird

to something like this

tar zcf thunderb-mail-${x}.tgz ~/.thunderbird/youradressbookfilename.mab

and it will just backup your adress book file.

3
  • 2
    thank you, I knew that, but (unfortunately) my .thunderbird-folder is >3GB large. I just want to backup the addressbook, not the whole profile...
    – Produnis
    Feb 19, 2011 at 13:34
  • 1
    @Produnis you just have to point the script to the adress book file instead of the whole directory, so it will just backup the file. i'll update my answer.
    – NES
    Feb 20, 2011 at 10:41
  • +1 for following up, and a very elegant solution Feb 20, 2011 at 11:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .