You too, please publish your useful code snippets in any programming language :
write an article !
Plateforme d'envoi de gros fichiers en ligne
Dépannage site web
Olivier Ligny - - 19/08/2012 - vue 31351 fois
Manual contact backup and restore on iPhone
This will help you to manually backup and restore the iPhone contacts database.
You may need a jailbroken iPhone to do that.
I just tested on iPhone 3GS with iOS 5.1.1 and it worked fine.
But there may be other easier solutions ...
- Copy AddressBook.sqlitedb from /private/var/mobile/Library/AddressBook/ on your iPhone, to your computer.
You can access the file by SSH, or by using a software like iFunbox, iExplorer, WinSCP, etc.
Tutorial : http://www.simonblog.com/2009/05/17/how-to-use-ssh-to-transfer-file-on-iphone/
2) CONVERT AND RESTORE
- The AddressBook.sqlitedb file is the raw contact database of iOS, you have to convert it to CSV first.
If you just copy it back to iPhone, it won't work most of the time, and you contact app may become buggy.
You must have installed the sqlite3 program on Linux or Windows.
Open a shell prompt and type the following command (on one line) :
sqlite3 -csv -header AddressBook.sqlitedb "select ROWID, first, last,
identifier, value, record_id from ABPerson p join ABMultiValue mv on
(ROWID=record_id) " > mybook.csv
The new CSV file will have one line per information, one line for each phone number or email address :
- Download and install free csv2vcard application :
Use it to create a VCF file from the CSV file, by matching each column to a valid VCard field.
- Send yourself the VCF file as an email attachment. Open this attachment in iPhone's Mail app. You will be able to import the contacts in one tap.
- Download and use an app like Cleanup Duplicate Contacts by Wim de Nood, or SmartMerge by YT Developments, to merge multiple contacts informations back into single contacts (all phone numbers into the same contact).
Anon - 26/04/2017
Great tip, thanks!
Export works on ios 8, didn't try the import, but the csv file is fine