Introduction

Please note that this guide is under construction and that deleted contacts cannot always be recovered in such a simple way.

Also, this is intended for advanced users only as this is not always an easy task.

NOTE: This will also work in Seamonkey 2.  The only differences are in the menus.

Initial Instructions

Before you begin, make sure that you have at least one good backup of the address book before attempting this recovery.

To begin, you need to find the location of your profile directory.  Your profile is where all of your settings and data are stored.

In Thunderbird, go to Tools -> Error Console then paste the following text and click Evaluate

alert(Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", Components.interfaces.nsIFile).path);

Then find that folder.  Before you do anything else, backup the entire profile folder to someplace safe.

Once you are there, make a copy of everything ending in .mab (yes, in addition to the full profile backup).  You should have at least abook.mab (Personal Address Book) and history.mab (Collected Addresses).  Any other address books will have the form abook-X.mab where X is a number, starting from 1.

Finding the Filename for your Address Book

If you are using the Personal Address Book it is abook.mab.

If you are using the Collected Addresses address book it is history.mab.

If you are using gContactSync, open the file gcontactsync_log.txt in your profile folder (0.2).  If there is a folder gcontactsync look in there (0.3 and above).

Open the log file in your favorite text editor and search for

moz-abmdbdirectory://

Anything after that is the filename.

Otherwise you can look at all of the abook-X.mab files until you find familiar data.

If you know how to open the Config Editor just enter the following as the filter:

MyNewAddressBook*.filename

(replace MyNewAddressBook with the name of your address book without spaces)

Background

When you delete a contact from Thunderbird, it is still stored in that Address Book for a certain period of time (possibly 6 months) in a deleted contacts table.

The less you do with the address book after the accidental deletion the better.

This guide assumes that the last action taken on the address book was the deletion of one or more contacts.

Before you proceed, you should have a basic understanding of the address book format.

Empty Mork Address Book

// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
(B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
(BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
(BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
(C2=ns:addrbk:db:table:kind:deleted)
(80=ns:addrbk:db:row:scope:card:all)
(81=ns:addrbk:db:row:scope:list:all)
(82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
(85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
(88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
(8B=SecondEmail)(8C=PreferMailFormat)(8D=PopularityIndex)
(8E=AllowRemoteContent)(8F=WorkPhone)(90=HomePhone)(91=FaxNumber)
(92=PagerNumber)(93=CellularNumber)(94=WorkPhoneType)(95=HomePhoneType)
(96=FaxNumberType)(97=PagerNumberType)(98=CellularNumberType)
(99=HomeAddress)(9A=HomeAddress2)(9B=HomeCity)(9C=HomeState)
(9D=HomeZipCode)(9E=HomeCountry)(9F=WorkAddress)(A0=WorkAddress2)
(A1=WorkCity)(A2=WorkState)(A3=WorkZipCode)(A4=WorkCountry)
(A5=JobTitle)(A6=Department)(A7=Company)(A8=_AimScreenName)
(A9=AnniversaryYear)(AA=AnniversaryMonth)(AB=AnniversaryDay)
(AC=SpouseName)(AD=FamilyName)(AE=WebPage1)(AF=WebPage2)(B0=BirthYear)
(B1=BirthMonth)(B2=BirthDay)(B3=Custom1)(B4=Custom2)(B5=Custom3)
(B6=Custom4)(B7=Notes)>
<(80=0)>
{1:^80 {(k^BC:c)(s=9)}
[1:^82(^BB=0)]}

This is a basic, empty address book.  It lists the default columns, including the DisplayName, PrimaryEmail, and WorkPhone, in bold.

There are two main tables that you are concerned with: the PAB (personal address book) and the deleted contacts table, both marked in bold.

Address Book with One Contact

// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
  (B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
  (BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
  (BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
  (C2=ns:addrbk:db:table:kind:deleted)
  (80=ns:addrbk:db:row:scope:card:all)
  (81=ns:addrbk:db:row:scope:list:all)
  (82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
  (85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
  (88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
...
  (B6=Custom4)(B7=Notes)>

<(80=0)>
{1:^80 {(k^BC:c)(s=9)}
  [1:^82(^BB=0)]}

@$${1{@
< <(a=c)> // (f=iso-8859-1)
  (C3=PhotoURI)(C4=PhotoType)(C5=DbRowID)>

<(86=1)(81=)(82=John Doe)(83=johndoe@host.invalid)(84
    =chrome://messenger/skin/addressbook/icons/contact-generic.png)
  (85=generic)>
{-1:^80 {(k^BC:c)(s=9)}
  [1:^82(^BB=1)]
  [-1(^B0=)(^B7=)(^B6=)(^B8=0)(^88=)(^AE=)(^A6=)(^87^82)(^B3=)(^A8=)
    (^84=)(^9F=)(^9E=)(^9C=)(^90=)(^8F=)(^89^83)(^85=)(^A1=)(^C3^84)
    (^99=)(^8E=0)(^8B=)(^8D=0)(^B5=)(^91=)(^B1=)(^A4=)(^9D=)(^9B=)(^92=)
    (^C4^85)(^93=)(^8C=0)(^83=)(^A2=)(^B2=)(^9A=)(^B4=)(^A3=)(^86=)
    (^A0=)(^C5=1)(^A5=)(^A7=)(^AF=)(^8A^83)(^B9=1)]}
@$$}1}@

Notice the new section in bold which appears at the bottom of the file.  @$${1{@ and @$$}1}@ mark the beginning and end, respectively, of a transaction which includes adding the contact.  The DisplayName is “John Doe” and the PrimaryEmail is “johndoe@host.invalid”.  If you look closely at the text with an underline you may see why.

Address book with John Doe Deleted

// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
...
  (B6=Custom4)(B7=Notes)>

<(86=1)(81=)(80=0)(82=John Doe)(83=johndoe@host.invalid)(84
    =chrome://messenger/skin/addressbook/icons/contact-generic.png)
  (85=generic)>
{1:^80 {(k^BC:c)(s=9)}
  [1:^82(^BB=1)]
  [1(^B0=)(^B7=)(^B6=)(^B8=0)(^88=)(^AE=)(^A6=)(^87^82)(^B3=)(^A8=)
...
    (^A0=)(^C5=1)(^A5=)(^A7=)(^AF=)(^8A^83)(^B9=1)]}

<(87=4b8f2772)>
{2:^80 {(k^C2:c)(s=9u)}
  [2(^83=)(^84=)(^87^82)(^89^83)(^8A^83)(^B8^87)]}

@$${2{@
{-1:^80 {(k^BC:c)(s=9)} 1:^82 }
[-1:^80]
@$$}2}@

Notice the new transaction between @$${2{@ and @$$}2}@.  This is what moves the contact into the deleted contacts table.  Do not worry about the other text that was added as that just contains some extra information about the contact (lastModifiedDate, FirstName, LastName DisplayName, PrimaryEmail, LowercasePrimaryEmail, lastModifiedDate).  I’ll leave it to you to figure out why.

Recovery of the file

Make sure you have a backup at this point.

  1. Close Thunderbird
  2. Open the address book file in your favorite text editor
  3. Save the file somewhere else, such as your Desktop
  4. To undo the deletion, simply delete the whole transaction from the file, see the sample below
  5. Save the modified file to your Desktop
// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
  (B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
  (BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
  (BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
  (C2=ns:addrbk:db:table:kind:deleted)(C3=PhotoURI)(C4=PhotoType)
  (C5=DbRowID)(C6=PalmRecId)(80=ns:addrbk:db:row:scope:card:all)
  (81=ns:addrbk:db:row:scope:list:all)
  (82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
  (85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
  (88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
  (8B=SecondEmail)(8C=PreferMailFormat)(8D=PopularityIndex)
  (8E=AllowRemoteContent)(8F=WorkPhone)(90=HomePhone)(91=FaxNumber)
  (92=PagerNumber)(93=CellularNumber)(94=WorkPhoneType)(95=HomePhoneType)
  (96=FaxNumberType)(97=PagerNumberType)(98=CellularNumberType)
  (99=HomeAddress)(9A=HomeAddress2)(9B=HomeCity)(9C=HomeState)
  (9D=HomeZipCode)(9E=HomeCountry)(9F=WorkAddress)(A0=WorkAddress2)
  (A1=WorkCity)(A2=WorkState)(A3=WorkZipCode)(A4=WorkCountry)
  (A5=JobTitle)(A6=Department)(A7=Company)(A8=_AimScreenName)
  (A9=AnniversaryYear)(AA=AnniversaryMonth)(AB=AnniversaryDay)
  (AC=SpouseName)(AD=FamilyName)(AE=WebPage1)(AF=WebPage2)(B0=BirthYear)
  (B1=BirthMonth)(B2=BirthDay)(B3=Custom1)(B4=Custom2)(B5=Custom3)
  (B6=Custom4)(B7=Notes)>

<(86=1)(81=)(80=0)(82=John Doe)(83=johndoe@host.invalid)(84
    =chrome://messenger/skin/addressbook/icons/contact-generic.png)
  (85=generic)>
{1:^80 {(k^BC:c)(s=9)}
  [1:^82(^BB=1)]
  [1(^B0=)(^B7=)(^B6=)(^B8=0)(^88=)(^AE=)(^A6=)(^87^82)(^B3=)(^A8=)
    (^84=)(^9F=)(^9E=)(^9C=)(^90=)(^8F=)(^89^83)(^85=)(^A1=)(^C3^84)
    (^99=)(^8E=0)(^8B=)(^8D=0)(^B5=)(^91=)(^B1=)(^A4=)(^9D=)(^9B=)(^92=)
    (^C4^85)(^93=)(^8C=0)(^83=)(^A2=)(^B2=)(^9A=)(^B4=)(^A3=)(^86=)
    (^A0=)(^C5=1)(^A5=)(^A7=)(^AF=)(^8A^83)(^B9=1)]}

<(87=4b8f2772)>
{2:^80 {(k^C2:c)(s=9u)}
  [2(^83=)(^84=)(^87^82)(^89^83)(^8A^83)(^B8^87)]}

Slightly more complex example (gContactSync, multiple contacts):

// <!-- <mdb:mork:z v="1.4"/> -->
< <(a=c)> // (f=iso-8859-1)
(B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
(BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
(BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
(C2=ns:addrbk:db:table:kind:deleted)(C3=DbRowID)(C4=PhotoURI)
(C5=Relation0)(C6=PhotoURL)(C7=SelfURL)(C8=PrimaryEmailType)
(C9=ICQScreenName)(CA=AdditionalName)(CB=TalkScreenName)
(CC=MSNScreenName)(CD=FourthEmail)(CE=JobDescription)(CF=PhotoName)
(D0=GoogleID)(D1=JabberScreenName)(D2=ThirdEmail)(D3=OtherNumber)
(D4=CompanySymbol)(D5=namePrefix)(D6=Relation2)(D7=Relation1)
(D8=PhotoType)(D9=HomeFaxNumber)(DA=PhotoEtag)(DB=EditURL)
(DC=Relation3)(DD=YahooScreenName)(DE=nameSuffix)(DF=PalmRecId)
(80=ns:addrbk:db:row:scope:card:all)
(81=ns:addrbk:db:row:scope:list:all)
(82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
(85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
(88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
(8B=SecondEmail)(8C=PreferMailFormat)(8D=PopularityIndex)
(8E=AllowRemoteContent)(8F=WorkPhone)(90=HomePhone)(91=FaxNumber)
(92=PagerNumber)(93=CellularNumber)(94=WorkPhoneType)(95=HomePhoneType)
(96=FaxNumberType)(97=PagerNumberType)(98=CellularNumberType)
(99=HomeAddress)(9A=HomeAddress2)(9B=HomeCity)(9C=HomeState)
(9D=HomeZipCode)(9E=HomeCountry)(9F=WorkAddress)(A0=WorkAddress2)
(A1=WorkCity)(A2=WorkState)(A3=WorkZipCode)(A4=WorkCountry)
(A5=JobTitle)(A6=Department)(A7=Company)(A8=_AimScreenName)
(A9=AnniversaryYear)(AA=AnniversaryMonth)(AB=AnniversaryDay)
(AC=SpouseName)(AD=FamilyName)(AE=WebPage1)(AF=WebPage2)(B0=BirthYear)
(B1=BirthMonth)(B2=BirthDay)(B3=Custom1)(B4=Custom2)(B5=Custom3)
(B6=Custom4)(B7=Notes)>
<(92=3)(81=1)(82=)(80=0)(89=1267675762)(83=Smith)(84
=http://www.google.com/m8/feeds/photos/media/gcontactsyncuser%40gmail.com/\
26e555190e366e11)(85
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/full\
/26e555190e366e11)(86=John Smith)(87=home)(88
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/base\
/26e555190e366e11)(8A=John)(8B=2)(8C=Doe)(8D
=http://www.google.com/m8/feeds/photos/media/gcontactsyncuser%40gmail.com/\
53d25d808f7e521b)(8E
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/full\
/53d25d808f7e521b)(8F=Jane Doe)(90
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/base\
/53d25d808f7e521b)(91=Jane)(93
=http://www.google.com/m8/feeds/photos/media/gcontactsyncuser%40gmail.com/\
7d43c77b8e3bff4f)(94
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/full\
/7d43c77b8e3bff4f)(95=John Doe)(96
=http://www.google.com/m8/feeds/contacts/gcontactsyncuser%40gmail.com/base\
/7d43c77b8e3bff4f)>
{1:^80 {(k^BC:c)(s=9)}
[1:^82(^BB=3)]
[1(^C3=1)(^8E=)(^8D=)(^8C=0)(^B8^89)(^89=)(^8A=)(^B9=1)(^C4=)(^9F=)
(^B0=)(^84^83)(^C5=)(^B4=)(^A9=)(^B6=)(^C6^84)(^B1=)(^AE=)(^C7^85)
(^88=)(^87^86)(^B7=)(^B3=)(^A8=)(^C8^87)(^C9=)(^9E=)(^9C=)(^8F=)
(^CA=)(^CB=)(^CC=)(^99=)(^CD=)(^CE=)(^AB=)(^CF=)(^B5=)(^D0^88)(^A1=)
(^A3=)(^8B=)(^D1=)(^91=)(^D2=)(^D3=)(^A4=)(^D4=)(^83^8A)(^9B=)(^92=)
(^D5=)(^D6=)(^93=)(^D7=)(^D8=)(^9D=)(^A2=)(^AA=)(^B2=)(^D9=)(^90=)
(^A6=)(^DA=)(^DB^85)(^DC=)(^DD=)(^A5=)(^DE=)(^A7=)(^AF=)]
[2(^C3=2)(^8E=)(^8D=)(^8C=0)(^B8^89)(^89=)(^8A=)(^B9=2)(^C4=)(^9F=)
(^B0=)(^84^8C)(^C5=)(^B4=)(^A9=)(^B6=)(^C6^8D)(^B1=)(^AE=)(^C7^8E)
(^88=)(^87^8F)(^B7=)(^B3=)(^A8=)(^C8^87)(^C9=)(^9E=)(^9C=)(^8F=)
(^CA=)(^CB=)(^CC=)(^99=)(^CD=)(^CE=)(^AB=)(^CF=)(^B5=)(^D0^90)(^A1=)
(^A3=)(^8B=)(^D1=)(^91=)(^D2=)(^D3=)(^A4=)(^D4=)(^83^91)(^9B=)(^92=)
(^D5=)(^D6=)(^93=)(^D7=)(^D8=)(^9D=)(^A2=)(^AA=)(^B2=)(^D9=)(^90=)
(^A6=)(^DA=)(^DB^8E)(^DC=)(^DD=)(^A5=)(^DE=)(^A7=)(^AF=)]
[3(^C3=3)(^8E=)(^8D=)(^8C=0)(^B8^89)(^89=)(^8A=)(^B9=3)(^C4=)(^9F=)
(^B0=)(^84^8C)(^C5=)(^B4=)(^A9=)(^B6=)(^C6^93)(^B1=)(^AE=)(^C7^94)
(^88=)(^87^95)(^B7=)(^B3=)(^A8=)(^C8^87)(^C9=)(^9E=)(^9C=)(^8F=)
(^CA=)(^CB=)(^CC=)(^99=)(^CD=)(^CE=)(^AB=)(^CF=)(^B5=)(^D0^96)(^A1=)
(^A3=)(^8B=)(^D1=)(^91=)(^D2=)(^D3=)(^A4=)(^D4=)(^83^8A)(^9B=)(^92=)
(^D5=)(^D6=)(^93=)(^D7=)(^D8=)(^9D=)(^A2=)(^AA=)(^B2=)(^D9=)(^90=)
(^A6=)(^DA=)(^DB^94)(^DC=)(^DD=)(^A5=)(^DE=)(^A7=)(^AF=)]}
<(97=4b8f32ea)>
{2:^80 {(k^C2:c)(s=9u)}
[4(^83^8A)(^84^83)(^87^86)(^B8^97)]}
@$${6{@
{1:^80 {(k^BC:c)(s=9)} -
[-1]}
{-2:^80 {(k^C2:c)(s=9)} 4
[-5(^83^91)(^84^8C)(^87^8F)(^B8^97)]}
@$$}6}@
@$${7{@
{-1:^80 {(k^BC:c)(s=9)} 1:^82 3 }
{-2:^80 {(k^C2:c)(s=9)} 4 5
[-6(^83^8A)(^84^8C)(^87^95)(^B8^97)]}
[-2:^80]
@$$}7}@
@$${8{@
{-1:^80 {(k^BC:c)(s=9)} 1:^82 }
[-3:^80]
@$$}8}@

In this case, multiple contacts were deleted.  Removing the text in bold would undelete those contacts.

If you are using gContactSync, please follow the directions below, otherwise skip to the bottom

Recovery with gContactSync

If you were using gContactSync when this happened:

  1. Go online to Gmail and delete any contacts that are still there
  2. Briefly open Thunderbird but not the Address Book window
  3. Go to Tools -> Add-ons and click Options under gContactSync
  4. Click on Accounts
  5. You should see your Gmail address under E-mail Address and blank space under Address Book (if not, stop and let me know)
  6. Select your username and address book and click Remove Login then click OK
  7. Close the Preferences dialog
  8. Disable gContactSync (until you make sure the address book is working)
  9. Close all Thunderbird windows (important)
  10. Copy your modified file over the original address book file in your profile directory
  11. Open Thunderbird and the Address Book window, then look at the address book

If all of the contacts are there do the following, otherwise let me know

  1. Go to Tools -> Add-ons and enable gContactSync
  2. Restart Thunderbird
  3. Go to Tools -> Add-ons then click on Accounts
  4. Click Add Login and enter your credentials then click OK
  5. Type the exact name of your address book, and click OK , then OK when it tells you that the address book already exists.
  6. Close the Preferences dialog
  7. Open the Address Book window
  8. Click on Sync in the Address Book window (if it doesn’t synchronize automatically) to add all your contacts back to Gmail.

Recovery without gContactSync

  1. Save the file over the address book
  2. Open Thunderbird
  3. Open the Address Book window and look at the address book.

Hope this helps!

Here is a simple address book with only one contact:

// <!– <mdb:mork:z v=”1.4″/> –>
< <(a=c)> // (f=iso-8859-1)
(B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
(BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
(BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
(C2=ns:addrbk:db:table:kind:deleted)
(80=ns:addrbk:db:row:scope:card:all)
(81=ns:addrbk:db:row:scope:list:all)
(82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
(85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
(88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
(8B=SecondEmail)(8C=PreferMailFormat)(8D=PopularityIndex)
(8E=AllowRemoteContent)(8F=WorkPhone)(90=HomePhone)(91=FaxNumber)
(92=PagerNumber)(93=CellularNumber)(94=WorkPhoneType)(95=HomePhoneType)
(96=FaxNumberType)(97=PagerNumberType)(98=CellularNumberType)
(99=HomeAddress)(9A=HomeAddress2)(9B=HomeCity)(9C=HomeState)
(9D=HomeZipCode)(9E=HomeCountry)(9F=WorkAddress)(A0=WorkAddress2)
(A1=WorkCity)(A2=WorkState)(A3=WorkZipCode)(A4=WorkCountry)
(A5=JobTitle)(A6=Department)(A7=Company)(A8=_AimScreenName)
(A9=AnniversaryYear)(AA=AnniversaryMonth)(AB=AnniversaryDay)
(AC=SpouseName)(AD=FamilyName)(AE=WebPage1)(AF=WebPage2)(B0=BirthYear)
(B1=BirthMonth)(B2=BirthDay)(B3=Custom1)(B4=Custom2)(B5=Custom3)
(B6=Custom4)(B7=Notes)>

<(80=0)>
{1:^80 {(k^BC:c)(s=9)}
[1:^82(^BB=0)]}

@$${1{@
< <(a=c)> // (f=iso-8859-1)
(C3=PhotoURI)(C4=PhotoType)(C5=DbRowID)>

<(86=1)(81=)(82=John Doe)(83=johndoe@host.invalid)(84
=chrome://messenger/skin/addressbook/icons/contact-generic.png)
(85=generic)>
{-1:^80 {(k^BC:c)(s=9)}
[1:^82(^BB=1)]
[-1(^B0=)(^B7=)(^B6=)(^B8=0)(^88=)(^AE=)(^A6=)(^87^82)(^B3=)(^A8=)
(^84=)(^9F=)(^9E=)(^9C=)(^90=)(^8F=)(^89^83)(^85=)(^A1=)(^C3^84)
(^99=)(^8E=0)(^8B=)(^8D=0)(^B5=)(^91=)(^B1=)(^A4=)(^9D=)(^9B=)(^92=)
(^C4^85)(^93=)(^8C=0)(^83=)(^A2=)(^B2=)(^9A=)(^B4=)(^A3=)(^86=)
(^A0=)(^C5=1)(^A5=)(^A7=)(^AF=)(^8A^83)(^B9=1)]}
@$$}1}@

The following sample shows the address book after that single contact has been deleted:

// <!– <mdb:mork:z v=”1.4″/> –>
< <(a=c)> // (f=iso-8859-1)
(B8=LastModifiedDate)(B9=RecordKey)(BA=AddrCharSet)(BB=LastRecordKey)
(BC=ns:addrbk:db:table:kind:pab)(BD=ListName)(BE=ListNickName)
(BF=ListDescription)(C0=ListTotalAddresses)(C1=LowercaseListName)
(C2=ns:addrbk:db:table:kind:deleted)(C3=PhotoURI)(C4=PhotoType)
(C5=DbRowID)(C6=PalmRecId)(80=ns:addrbk:db:row:scope:card:all)
(81=ns:addrbk:db:row:scope:list:all)
(82=ns:addrbk:db:row:scope:data:all)(83=FirstName)(84=LastName)
(85=PhoneticFirstName)(86=PhoneticLastName)(87=DisplayName)
(88=NickName)(89=PrimaryEmail)(8A=LowercasePrimaryEmail)
(8B=SecondEmail)(8C=PreferMailFormat)(8D=PopularityIndex)
(8E=AllowRemoteContent)(8F=WorkPhone)(90=HomePhone)(91=FaxNumber)
(92=PagerNumber)(93=CellularNumber)(94=WorkPhoneType)(95=HomePhoneType)
(96=FaxNumberType)(97=PagerNumberType)(98=CellularNumberType)
(99=HomeAddress)(9A=HomeAddress2)(9B=HomeCity)(9C=HomeState)
(9D=HomeZipCode)(9E=HomeCountry)(9F=WorkAddress)(A0=WorkAddress2)
(A1=WorkCity)(A2=WorkState)(A3=WorkZipCode)(A4=WorkCountry)
(A5=JobTitle)(A6=Department)(A7=Company)(A8=_AimScreenName)
(A9=AnniversaryYear)(AA=AnniversaryMonth)(AB=AnniversaryDay)
(AC=SpouseName)(AD=FamilyName)(AE=WebPage1)(AF=WebPage2)(B0=BirthYear)
(B1=BirthMonth)(B2=BirthDay)(B3=Custom1)(B4=Custom2)(B5=Custom3)
(B6=Custom4)(B7=Notes)>

<(86=1)(81=)(80=0)(82=John Doe)(83=johndoe@host.invalid)(84
=chrome://messenger/skin/addressbook/icons/contact-generic.png)
(85=generic)>
{1:^80 {(k^BC:c)(s=9)}
[1:^82(^BB=1)]
[1(^B0=)(^B7=)(^B6=)(^B8=0)(^88=)(^AE=)(^A6=)(^87^82)(^B3=)(^A8=)
(^84=)(^9F=)(^9E=)(^9C=)(^90=)(^8F=)(^89^83)(^85=)(^A1=)(^C3^84)
(^99=)(^8E=0)(^8B=)(^8D=0)(^B5=)(^91=)(^B1=)(^A4=)(^9D=)(^9B=)(^92=)
(^C4^85)(^93=)(^8C=0)(^83=)(^A2=)(^B2=)(^9A=)(^B4=)(^A3=)(^86=)
(^A0=)(^C5=1)(^A5=)(^A7=)(^AF=)(^8A^83)(^B9=1)]}

<(87=4b8f205e)>
{2:^80 {(k^C2:c)(s=9u)}
[2(^83=)(^84=)(^87^82)(^89^83)(^8A^83)(^B8^87)]}

__@$${3{@
{-1:^80 {(k^BC:c)(s=9)} 1:^82 }
[-1:^80]
@$$}3}@__

9 Comments

Randall · March 28, 2010 at 3:20 PM

This was very helpful. Somehow about 95% of my contacts disappeared from my T-Mobile G1 and my gmail account. Thanks to this guide I was able to restore them. What a lifesaver. I will definitely be more diligent about backing up my data from now on.

Thanks again, Pi!

vickyjo · July 4, 2010 at 5:41 AM

This was helpful in pointing me in the direction of address
book and that the contacts remain stored there after deletion. As I
had only deleted 2 contacts, I opted for a simpler method of
copying the address book file to a different location, opening it
up in a text editor, searching for the deleted contacts and
re-entering these manually into Thunderbird.

Steve · August 23, 2010 at 3:16 PM

Wondering if somehow I could use above to help me recover my Personal Address Book. I deleted all contacts in the Personal Address Book, but not the address book itself. However, next time I started Thunderbird, it was gone. I checked my profile directory and abook.mab is still there with data, but it will not show up in my address book listing. Any suggestions on how to get it back?

Pi · December 24, 2010 at 11:55 AM

The article should work in your case, the sooner you follow the instructions the better.

David von Oheimb · November 2, 2012 at 2:03 PM

Thanks a lot for this extremely helpful information!

In my case, the whole address book appeared to be deleted, but in fact just the encoding for one of the transactions was slightly garbled (I presume due to an incomplete write operation or a similar error during a forced shutdown of Thunderbird). After correcting the respective line, the whole address book loaded again fine.

joe ortiz · March 25, 2013 at 9:07 PM

Please restore contacts I accidently deleted

Pi · December 26, 2013 at 9:42 AM

Hi Joe, I don’t have access to your contacts so I cannot restore them. You can restore Google Contacts at http://google.com/contacts and restore TB contacts by following the instructions in this blog post.

Lukas · January 19, 2014 at 5:53 AM

VERY HELPFUL, this article!

abook.mab and history.mab “disappeared”…

Removed one transaction after the other beginning from the end until the adressbooks showed up again…

THANKS!
L.

Note to gContactSync Users – Please update ASAP « Pi’s Blog · March 25, 2010 at 10:13 AM

[…] Recovering Deleted Contacts From Thunderbird 3 « Two new add-ons and gContactSync Update […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.