or any other backup of ~"/Library/Application Support/AddressBook/".
No consideration is given here to iCloud Contacts sync (though thermo2's 20-step procedure is reproduced below without prejudice). Back up, back up, back up and understand what you are doing. Contacts.app needs to be closed before attempting all methods but the first.
Open Contacts.app then "Enter Time Machine" from menu bar icon to restore (H/T). Note that the "Browse Other Backup Disks..." option accessed by Option-clicking the Time Machine menu bar icon really means "Browse Other Backup Disks for the current device". (UPDATE: Michael Tsai reports that this method does not work in Monterey; further, he shared that Time Machine restores in apps other than Finder have not worked for him since around Mojave.)
Replace ~"/Library/Application Support/AddressBook/" folder with backup copy of same (tested successfully in High Sierra, Mojave, Catalina, Big Sur, and Monterey).
Add .abbu extension to backup copy of ~"/Library/Application Support/AddressBook/" then double click to import (tested successfully in modern macOS versions; similar to above method, but might make importing recovered data simpler for end users).
Replace ~"/Library/Application Support/AddressBook/AddressBook-v22.abcddb" with backup copy of same. Tested successfully in Lion
but failed in modern macOS versions (worked in Catalina and higher as long as ~"/Library/Application Support/AddressBook/" was otherwise empty).
Delete contents of ~"/Library/Application Support/AddressBook/".
Paste the Metadata folder containing .abcdp files (found at either ~"/Library/Application Support/AddressBook/Metadata/" or ~"/Library/Application Support/AddressBook/Sources/UUID/Metadata/") from backup copy into ~"/Library/Application Support/AddressBook/".
Launch Contacts.app; it will recreate AddressBook-v22.abcddb from the .abcdp files in Metadata/ (tested successfully in High Sierra and Mojave, even for Metadata folders created under newer versions of macOS (which is fortunate, as the process failed in Catalina, Big Sur, and Monterey; after exporting a Contacts Archive from Mojave, it was successfully restored to Big Sur, though logging off and on was required for the contacts to appear)).
Address Book File Locations (2009)
thermo2's iCloud workaround (linked from Time Machine - Frequently Asked Questions: 15c. Viewing or Restoring Contacts / Address Book: "If you're using iCloud, the procedure ... will not 'stick' since the cloud contains the 'master' copy, as soon as you connect to it, anything you restored from your backups will be replaced with the contents from the cloud. For a workaround, see this discussion post."):
/mac | May 19, 2022
Subscribe or visit the archives.