You should be able to restore your contacts from an iPhone backup. How/why did you erase all your contacts in Address Book? Are your contacts on MobileMe?
First, how do I restore using the I phone back up? Meaning,, how do i access the backup data.
as far as how it happened,, my wife had a bunch of duplicate contacts in her address book on the computer. she deleted all the contacts in the address book hoping to sync the iphone and have all the iphone contacts go into the computer's address book. Instead when she synced the iphone her iphone contacts were replaced by the now empty computer address book!
With itunes open, click on itunes up by the apple and choose preferences.
If you have itunes 8, click on the devices tab.
If itunes 7, click on the iphone tab.
Here itunes lists all the backups that are available for the iphone or ipod.
you should also see a check box to disable automatic syncing for all iphones and ipods.
Check this box and click ok.
This will keep itunes from overwriting a backup when the iphone is connected.
To access these backups, connect the iphone.
When the iphone shows up under devices, control click on the iphone under devices and choose restore from backup.