I believe this is the only place in the internet you can find accurate information on how to restore your CONTACTS. There are many guides out there and posts but they are either incomplete or wrong, mostly due to misinformation. I actually figured this out randomly... Usually this is the case for good things in life : )
I stumbled upon this blog looking how to restore my backed up contacts.
I followed the 2 methods posted there and neither of them worked for me. The issue seems to be that every time I was copying over the Addressbook.sqlitedb over I could see the contacts in both Phone App & Contacts App but as soon as I pressed Home button, the Apple logo showed up with a progress bar and after that, the contacts vanished and were empty again.
I tried MANY things. None seemed to work. It was frustrating since I thought I was so close on every attempt...
WHAT YOU NEED TO DO:
(1) You need a (backup) copy of your contacts that you want to restore. Your best bet is to locate the following file name inside iTunes backup folder: 31bb7ba8914766d4ba40d6dfb6113c8b614be442 The path for this file in a Windows XP system is C:\Documents and Settings\[YourUserName]\Application Data\Apple Computer\MobileSync\Backup I'm not too sure what is the right path on Windows-7 [please double check] but it could be C:\Users\[YourUserName]\AppData\Roaming\AppleComputer\MobileSync\Backup. Just make a copy of that file and place it somewhere else. Rename it to AddressBook.sqlitedb
Alternatively you may have a copy of the contacts file that you got in the past from accessing your iPhone's file system. You can access that file if your device is Jailbroken by browsing the raw filesystem using a file browser utility like iPhoneBrowser or i-FunBox. These are freeware utilities. Run a Google search and download one of them. These are very useful to mess around with the iPhone/iPad file system and they allow you to do different things like backup copies of your Apps, install new Wallpapers, ring tones, etc. You should be very careful about messing around with files in general or deleting any stuff. If you screw up you may end up having to restore your device. By following this guide you should be ok, we are not doing nothing funny here, but just be warned.
The contacts file is stored in /var/mobile/Library/AddressBook/ and the file name is AddressBook.sqlitedb. There is also another copy in /var/root/Library/AddressBook/ but I'm not too sure what that one is being used for. Initially I thought one was used by the Phone App and the other by the Contacts App but that is not the case. Also note that many people incorrectly talks about a different path being /private/var/... It is actually the same file accessed (mounted) through a different route. This is a Unix thing if you are not familiar with Unix file system...
You also need a freeware tool called SQLite Database Browser. SQL is a database format. You don't need to know much more about it. The important thing to understand is that your contacts information (name, phone numbers, email) is stored in a particular format which is accessible using that tool. For example, you could access your contacts information with it and generate a CSV (Excel) file which represents the info as a tab separated list with commas, allowing you to import the contacts info into some other device (if you ever change your phone by an Android one..) or software like Outlook. There are specific guides and software to assist you in that process which is out of the scope of this guide, but I encourage you to Google them if you want further info.
You should be able then to open that file with SQLite Database Browser. There are several fields containing the relevant information like names, phone numbers, emails, etc. I won't go into detail as it gets complicated.
(2) If you are trying to restore the contacts from a different iOS (Firmware) version you also need to copy the empty contacts from your current file system. WHY WE NEED THAT? Long story short, if you open the contacts file with SQLite Database Browser, and go to 'Browse Data' tab there is a field named '_ClientVersion' under '_SqliteDatabaseProperties'. We would need to match the version number in that field for the old backup of AddressBook.sqlitedb with the current version in your iOS, otherwise the process will fail and the contacts won't get restored. This is the main point of the whole process and it seems to be what people is missing in other guides available in the internet. YOU CAN SKIP THIS STEP IF YOUR ARE RESTORING CONTACTS FROM SAME FIRMWARE/iOS VERSION.
(3) now open the backup copy of your AddressBook.sqlitedb with your contacts and edit that field to match the same version number in the current iOS. Save the file! (update it).
(4) FINALLY copy over the updated copy of your AddressBook.sqlitedb to both /var/mobile/Library/AddressBook/ and /var/root/Library/AddressBook/ (just drag it from the location you have it on your PC and drop it [inside the iPhone browser application of your choice, i-FunBox/iPhoneBrowser...] in the path mentioned above, and you should see the contacts in your Phone App and Contacts App right away, no need to reboot or anything!
I spent a few days until I got this right. I honestly don't know much about the iPhone but I have become an 'expert' by just browsing the net and figuring out things by myself. So I encourage people to do so and learn. There is a bunch of crap out there... and it is up to us to filter it and seize the good stuff. Good luck!