Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

himynameiscody

macrumors 6502a
Original poster
Oct 9, 2011
765
0
Wirelessly posted (Mozilla/5.0 (iPhone; CPU iPhone OS 5_0_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A406 Safari/7534.48.3)

Possible?
 

Kar.ma

macrumors newbie
Dec 30, 2011
9
0
All your Address Contacts are stored in this single (database) file:
/var/mobile/Library/AddressBook/AddressBook.sqlitedb

If you want to back up contacts images too, you can backup the entire AddressBook folder.

If you want to read its content, you can export it to csv. I did it this way (in Windows 7):
- copy AddressBook.sqlitedb to C:\temp\ (e.g.)
- download sqlite3 command-line shell (from http://www.sqlite.org/download.html) and extract zip file in C:\temp\
- open a Command Prompt and write (omit the "sqlite>" string):

cd /d c:\temp
sqlite3.exe AddressBook.sqlitedb
sqlite> .mode csv
sqlite> .output mycontacts.csv
sqlite> SELECT ROWID, ABPerson.prefix,ABPerson.suffix, ABPerson.first,ABPerson.middle,ABPerson.last, ABMultiValue.value, ABPerson.note, ABPerson.nickname, ABPerson.organization, ABPerson.department, ABPerson.jobtitle, ABPerson.birthday from ABPerson,ABMultiValue where ABMultiValue.record_id=ABPerson.ROWID;
sqlite> .quit

Now you can open mycontacts.csv with Excel. I had a problem with my Italian Excel and had to replace all "," inside csv file to ";" (damn you Microsoft), before having it working.

Drop here a line if this was useful to you.

[EDIT 2012-03-23_09.53]
For avoiding Excel from considering phone numbers as "numbers" I renamend .csv file to .txt. Choose Open in Excel and it will ask you for some questions. Be careful that in step 3 you need to choose "Text" manually for each column

[EDIT 2013-02-17_11.54]
I used my own guide again today, and found out a little mistake (there was a double "select"), which I corrected.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.