Moving address books between profiles: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(Adding Recover corrupt books - help with editing ok by me.)
m (workaround for greyed out out menu)
 
(14 intermediate revisions by 5 users not shown)
Line 1: Line 1:
The address books that you use with Thunderbird or Mozilla Suite are by default stored in your [[profile folder]]. The two default address books, called "Personal Address Book" and "Collected Addresses," are named "'''abook.mab'''" and "'''history.mab'''", respectively. Other address books that you create in addition to these will also be named with the "'''.mab'''" extension, such as "abook-1.mab" or "abook-2.mab".
The address books that you use with Thunderbird or Mozilla Suite are by default stored in your [[profile folder]]. The two default address books are called "Personal Address Book" and "Collected Addresses" and are stored in "'''abook.mab'''" and "'''history.mab'''" files, respectively. Other address books that you create will also be named with the "'''.mab'''" extension, such as "abook-1.mab" or "abook-2.mab".


===Moving address books to another profile===
===Moving address books to another profile===
The two default address books ("abook.mab" and "history.mab") can be copied directly from one profile folder to another. (This includes copying them from a Mozilla Suite profile or Netscape 7 profile to a Thunderbird profile.) Thunderbird will automatically recognize these address books when it starts up and you will be able to use them right away.
The two default address books ("abook.mab" and "history.mab") can be copied directly from one profile folder to another, overwriting the associated file. Thunderbird will automatically recognize these address books when it starts up and you will be able to use them right away.


Other address books (such as "abook-1.mab") can not be copied from profile to profile in this way. To move these from one profile to another, you should first "export" each address book as as LDIF file and then "import" each address book into the other profile. To export an address book:
Other address books (such as "abook-1.mab") can not be copied from profile to profile this way because by default Thunderbird only knows about the "Personal Address Book" and "Collected Addresses" address books. To move other address books you need to both copy the file and update the prefs.js file to tell Thunderbird about the new address book. They are two ways you could do this for each address book.
 
Method 1: Import an existing *.mab file using the MoreFunctionsForAddressBook add-on (recommended)
 
If you are moving a *.mab file from one Thunderbird profile to another the simplest way is to use the [http://www.nic-nac-project.org/~kaosmos/morecols-en.html MoreFunctionsForAddressBook] extension to import the address books (as is, without having to convert them). It will copy the files and update prefs.js.
 
It adds the command in the Tools menu in the address book window, not the Tools menu in the main window. One quirk is that "Actions for address books" is grayed out in Tools -> MoreFunctionsForAddressBooks in the address book window if "all address books" is selected. Select a real address book such as "personal address book" to workaround this.
 
Method 2: Export an address book as a .LDIF or .CSV file and then import it.
 
* Start Thunderbird using the profile whose address books you want to move.
* In the Address Book window, select the address book that you want to export.
* In the Address Book window, select the address book that you want to export.
* Go to the "Tools" menu and select "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.
* 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.
Address books saved as LDIF files can later be imported into any Thunderbird profile by going to "Tools -> Import..." and then selecting the address book(s) you previously exported.
* Switch to the other profile. If you're using the same computer for both profiles you could do this using either the [[Profile_Manager | profile manager]], [https://addons.mozilla.org/en-US/thunderbird/addon/profileswitcher/?src=search profile switcher add-on], or using a [http://kb.mozillazine.org/Running_from_a_USB_drive_-_Thunderbird -profile command line argument] if you are launch Thunderbird using a windows console.
* Import it in Thunderbird, using [[Menu_differences_in_Windows,_Linux,_and_Mac | Tools -> Import]] -> Address Books -> Text files.
 
If it's not possible to export the address book you could use a utility such as [http://www.majorgeeks.com/files/details/dawn.html Dawn] to convert the .MAB file to a .LDIF file. It also knows how to convert several other formats.


===Recovering address books from a damaged profile===
===Recovering address books from a damaged profile===
Line 28: Line 41:


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.
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.
===Recovering corrupt address books===
Address books can become corrupt if Thunderbird crashes. Hopefully Daifne won't mind if I copy her wonderful help here.
Thunderbird has renamed the old, corrupted address book to abook.mab.bak (assuming that you were using the Personal address book). It is often possible to fix this file but you need to be careful.
First, with Thunderbird closed, you need to find it in your profile folder. You are using XP, so your profile is here: C:\Documents and Settings\*user name*\Application Data\Thunderbird\Profiles\*random string.profile name* and the abook.mab.bak will be in this folder.
If you are using Windows, before you try to find your profile, you need to set Windows to "View hidden files and folders" and to not "Hide extensions for known file types". See this for easy instructions for how to do this: http://spywarewarrior.com/viewtopic.php?t=272
Now, the very first thing I want you to do is to make a copy of the file. You are going to work with the copy, just in case. Wink
You can open the file with a text editor like Notepad or Wordpad. You want to look for any corruption and delete it. There is a lot of odd looking stuff normally that you don't want to delete. For example, this is normal:
Code:
[1(^87^81)(^83^81)(^89^82)(^8A^82)(^BB=1)(^84=)(^85=)(^86=)(^88=)
    (^8B=)(^8C=)(^8D=)(^8E=0)(^C6=e)(^8F=)(^90=)(^91=)(^92=)(^93=)(^94=)
    (^95=)(^96=)(^97=)(^98=)(^99=)(^9A=)(^9B=)(^9C=)(^9D=)(^9E=)(^9F=)
    (^A0=)(^A1=)(^A2=)(^A3=)(^A4=)(^A5=)(^A6=)(^A7=)(^A8=)(^A9=)(^AA=)
    (^AB=)(^AC=)(^AD=)(^AE=)(^AF=)(^B0=)(^B1=)(^B2=)(^B3=)(^B4=)(^B5=)
    (^B6=)(^B7=)(^B8=)(^B9=)(^BA^428)]
In one I worked on, a bunch of stuff like this was appended onto the file. This was corruption and needed to be removed:
Code:
[2005-10-27  16:05:54    768  848  Setup  Successfully copied source file
  C:\WINDOWS\SoftwareDistribution\WebSetup\wuauclt.exe to C:\WINDOWS\System32\wuauclt.exe.wusetup.8490828.new
  2005-10-27  16:05:54    768  848  Setup  Setup successfullly moved C:\WINDOWS\System32\wuauclt.exe.wusetup.8490828.new
  to C:\WINDOWS\System32\wuauclt.exe  2005-10-27  16:05:54    768  848  Setup  File operations for section wuauclt
  completed successfully]
Once you clear the corruption, save the file as abook.mab back into your profile where you found it. You should get a message about a file of that name already existing. OK copying over it.
http://forums.mozillazine.org/viewtopic.php?t=456312&highlight=bak


[[Category:Address Book (Thunderbird)]]
[[Category:Address Book (Thunderbird)]]
[[Category:Profiles]]
[[Category:Profiles]]

Latest revision as of 11:04, 6 March 2018

The address books that you use with Thunderbird or Mozilla Suite are by default stored in your profile folder. The two default address books are called "Personal Address Book" and "Collected Addresses" and are stored in "abook.mab" and "history.mab" files, respectively. Other address books that you create will also be named with the ".mab" extension, such as "abook-1.mab" or "abook-2.mab".

Moving address books to another profile

The two default address books ("abook.mab" and "history.mab") can be copied directly from one profile folder to another, overwriting the associated file. Thunderbird will automatically recognize these address books when it starts up and you will be able to use them right away.

Other address books (such as "abook-1.mab") can not be copied from profile to profile this way because by default Thunderbird only knows about the "Personal Address Book" and "Collected Addresses" address books. To move other address books you need to both copy the file and update the prefs.js file to tell Thunderbird about the new address book. They are two ways you could do this for each address book.

Method 1: Import an existing *.mab file using the MoreFunctionsForAddressBook add-on (recommended)

If you are moving a *.mab file from one Thunderbird profile to another the simplest way is to use the MoreFunctionsForAddressBook extension to import the address books (as is, without having to convert them). It will copy the files and update prefs.js.

It adds the command in the Tools menu in the address book window, not the Tools menu in the main window. One quirk is that "Actions for address books" is grayed out in Tools -> MoreFunctionsForAddressBooks in the address book window if "all address books" is selected. Select a real address book such as "personal address book" to workaround this.

Method 2: Export an address book as a .LDIF or .CSV file and then import it.

  • Start Thunderbird using the profile whose address books you want to move.
  • 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.
  • Switch to the other profile. If you're using the same computer for both profiles you could do this using either the profile manager, profile switcher add-on, or using a -profile command line argument if you are launch Thunderbird using a windows console.
  • Import it in Thunderbird, using Tools -> Import -> Address Books -> Text files.

If it's not possible to export the address book you could use a utility such as Dawn to convert the .MAB file to a .LDIF file. It also knows how to convert several other formats.

Recovering address books from a damaged profile

In the unfortunate event that your profile is damaged, it is possible to recover your address books, even if the profile itself is unusable. Of course you have made regular backups which you can simply import, but just in case you hadn't... read on.

First, copy the damaged profile, or at least the ".mab" files, to a safe place. Next, you will have to make a new profile, configure your accounts and preferences, etc. Start Thunderbird and go to the address book. Create some new address books ("File -> New -> Address Book"). Create as many address books as you had in the damaged profile, and give them names like "AB1", "AB2", ...

Now exit Thunderbird, and go to the new profile folder. You will see files with names like "abook-1.mab", "abook-2.mab", with small file sizes, because they are empty. Copy the saved ".mab" files from the old, damaged profile into the new profile. For each ".mab" file from the old profile, there should be a file with the same name in the new profile. If there isn't, rename the old file, giving it the name of a new file which is not used yet.

Start Thunderbird again, and go to the address book. If all is well, the newly created address books are filled with the contents of the old ones. You can now change the names "AB1", "AB2", ... into something more meaningful by right-clicking on each address book and choosing "Properties".

Of course, if your old address books have been damaged, this procedure will not help.

Backing up your address books

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.