7

After I back-up Mac Contacts to a .abbu file, is there a program that lets me get at the underlying data vs. just importing them? I.e., can I open them as a text file or .CSV. Thank you!

  • Wonderful question! I have the same issue at hands and Address Book exporting capabilities are... lame... – brasofilo Nov 22 '13 at 5:37
3

If you have iWorks/Numbers installed, check the tutorial:

How to Convert an Address Book ABBU File to CSV

ABBU is the native file type for the Mac OS X Address Book, which means that you can only open ABBU files using the Mac Address Book application. However, you can use the iWork Numbers application to import the ABBU file, and then export the data file to a Comma Separated Value, or CSV, file format, which is a generic text file format that you can import into any address book or database application, regardless of operating system.

Also you could try the tool:

AB2CSV

Also known as Address Book to CSV Exporter, this Mac OS X utility allows the user to export his own Address Book in a CSV or VCF file.

You did mention "vs just importing them", but if you can use the first method to export them to Numbers, you can then save as .CSV.

  • 1
    Answers on Ask Different need to be more than just a link. It's okay to include a link, but please summarize or excerpt it in the answer. The idea is to make the answer stand alone. – nohillside Nov 22 '13 at 4:33
  • 2
    @patrix, I think the network motto is We collect solutions, not links ;) . . . . . . . . BsdHelper, check the guide How to Answer; when I started on the Stack, I learned a lot reading (and checking the markdown) of the top Q&A's of my preferred site (WPSE). – brasofilo Nov 22 '13 at 5:42
  • @patrix & brasofilo Will do guys. Apologies for my laziness. – BsdHelper Nov 30 '13 at 6:06
  • With Mavericks, this solution only works if you're willing to delete all the existing people in Contacts (i.e. the import replaces the existing address book; there's no merge or append option). I'd love a way to get into an abbu file without deleting all my existing contacts. – Eric Dec 30 '13 at 0:33
  • 1
    in numbers 3.5.3 (yosemite), i cannot find a import option able to handel .abbu files... – Sibe Jan Jun 12 '15 at 20:41
3

I had my contacts backed up in an abbu file exported from Yosemite Contacts. When I tried to import them into El Capitan Contacts, I encountered the same problem as fish923.

This sucked because the abbu file was my only backup.

I looked into it and an abbu file (actually a folder) appears to be basically a copy of the internal data used by Contacts. With no way to import it, there is no way to export it into a saner format, like a bunch of vCards.

Try to avoid ever getting into this situation. If it's too late, here is what you can do:

  1. Download a SQLite client like Base, MesaSQLite, SQLite Manager, etc. (Alternatively you could try the command line: https://stackoverflow.com/questions/5776660/export-from-sqlite-to-csv-using-shell-script)
  2. Right-click on your abbu file and Show Package Contents. Navigate into the Sources folder. One of these UUID subfolders corresponds to one of your CardDAV accounts. Pick one.
  3. Open up the AddressBook-v22.abcddb file in your SQLite client.
  4. Enter the following SQL query. Note that this is just something quick & dirty that I came up with in an exasperated state, and does not preserve everything, so feel free to modify it by examining the individual tables to see whether there is any data you want that it leaves out:

SELECT ZABCDRECORD.Z_PK, ZABCDRECORD.ZBIRTHDAYYEAR, ZABCDRECORD.ZFIRSTNAME, ZABCDRECORD.ZMIDDLENAME, ZABCDRECORD.ZLASTNAME, ZABCDRECORD.ZORGANIZATION, ZABCDRECORD.ZJOBTITLE, ZABCDPHONENUMBER.ZFULLNUMBER, ZABCDPHONENUMBER.ZLABEL, ZABCDPOSTALADDRESS.ZCITY, ZABCDPOSTALADDRESS.ZCOUNTRYNAME, ZABCDPOSTALADDRESS.ZLABEL, ZABCDPOSTALADDRESS.ZSTATE, ZABCDPOSTALADDRESS.ZSTATE, ZABCDPOSTALADDRESS.ZZIPCODE, ZABCDEMAILADDRESS.ZADDRESS FROM ZABCDRECORD LEFT JOIN ZABCDPOSTALADDRESS ON ZABCDPOSTALADDRESS.ZOWNER = ZABCDRECORD.Z_PK LEFT JOIN ZABCDEMAILADDRESS ON ZABCDEMAILADDRESS.ZOWNER = ZABCDRECORD.Z_PK LEFT JOIN ZABCDPHONENUMBER ON ZABCDPHONENUMBER.ZOWNER = ZABCDRECORD.Z_PK;

Behold, most of your contacts data. Export this into CSV or whatever, and have fun manually re-entering it into Contacts. Or, I guess you could write a script to process the CSV into vCards, if Contacts doesn't choke on those too.

  • This isn't an answer to the original question. Please make a clear question of what you want to do or what problem you have. – daniel Azuelos Jan 17 '16 at 10:24
2

I finally found a rather easy way to read my .abbu directory without importing it into my exising address book: create a new user, open its address book and import the .abbu.

This way I could select a couple of strangely lost contacts, export this selection and import it into my exising contacts.

1

In Contacts Version 8.0 (1371) running on OS X 10.9.4, you can export a multi-card file in the .vcf format as follows:

  1. Launch the Contacts application.
  2. Ensure that all your contacts are showing by clicking "All Contacts" in the Groups panel. (If you don't see the Groups panel, which starts with "All Contacts," on the left side of the window, choose View > Show Groups from the menu.)
  3. Click the first contact on the contacts list.
  4. Choose Edit > Select All from the menu. Ensure that the card detail area on the right shows how many cards have been selected (e.g., "612 Cards Selected").
  5. Choose File > Export > Export vCard...
  6. Enter the desired export filename and location, and click Save.

You will now have a single .vcf file with all of your contacts. This is a text file which you can open with TextEdit. You may also find tools that convert .vcf to other formats, such as .csv, if you need it.

This .vcf file can be used to restore your contacts or migrate them to other devices.

1

I FOUND A SOLUTION to some of the problems laid out here.

I had the exact same problem as fish923, I had a .abbu file and every time I tried to import my contacts the Contacts app synced with iCloud and erased all contacts.

To restore your backup successfully you need to do this:

1.- Disconnect from the internet.
2.- go to your user AddressBook folder inside your Library folder: Users/(your user)/Library/Application Support/AddressBook/…
3.- Delete contents inside AddressBook folder (or move them to the Desktop just in case)
4.- Right click on your .abbu file and select “Show Package Contents”.
5.- Copy contents from your .abbu file to the AddressBook Folder.
6.- Open Contacts app and export all contacts as vCard (make sure you select all contacts for export).
7.- Now you can connect to the internet, the Contacts app will sync with iCloud and again remove all your contacts but don't worry, you can now import the form de vCard file.

This worked for me. Hope it helps somebody.

0

There is a way to access directly to the data saved within a .abbu (Address Book Backup) directory.

Let's say you saved your address book as proposed by default with the name Contacts - DD-MM-YYYY.abbu. You will have to use the command line for this with:

cd 'Contacts - DD-MM-YYYY.abbu/Metadata'
plutil -convert xml1 *

If you want to work directly on these plist files, and later use them within your addess book, I advise to first test this on a test account, let's say Bob.

Within Bob test account, you will have to bring the .abbu in place of the Library/Application Support/AddressBook:

/usr/bin/sudo cp -r 'Contacts - DD-MM-YYYY.abbu/' '/Users/bob/Library/Application Support/AddressBook'

# the / after .abbu directory name is mandatory to copy the contents
# in the destination directory, this will overwrite the address book
# of Bob

/usr/bin/sudo rm '/Users/Bob/Library/Application Support/AdressBook/AddressBook-v22.abcddb'

# the removal of this `.db` will force `Contacts` to rebuild it from
# the contents of the `Metadata` directory.

/usr/bin/sudo chown -R bob '/Users/bob/Library/Application Support/AddressBook'

Warning: don't copy and paste the above commands if you don't fully understand what they do. A space or a star anywhere might damage your working account, your working MacOS X.

Login as Bob to check this new address book.

You must log in to answer this question.

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