I upgraded from Mojave to Big Sur and forgot to export contacts. I have a backup of the files in ~/Library/Application Support/AddressBook
, which I tried to recover with the three methods mentioned in How to restore the AddressBook database from backup
First, I quit all applications (except Terminal and Firefox), deleted the .abcddb
file and copied it from the backup
$ rm ~/Library/Application\ Support/AddressBook/*.abcddb
$ cp /path/to/backup/AddressBook/AddressBook-v22.abcddb ~/Library/Application\ Support/AddressBook
Contacts showed no cards, so the first line worked (otherwise, it would show the Apple card and my own card):
Then, I copied the Metadata
directory, which supposedly contains all the information in case the .abbcddb
file goes corrupt:
$ rm ~/Library/Application\ Support/AddressBook/*.abcddb
$ rm -r -f ~/Library/Application\ Support/AddressBook/Metadata/
$ cp -r /path/to/backup/AddressBook/Metadata ~/Library/Application\ Support/AddressBook
Again, Contacts shows no contact information, just like above.
Third, I change the extension of the AddressBook
directory in the backup to .abbu
and double-click on it, which has an effect:
I click "Replace all". This does something because the ~/Library/Application Support/AddressBook/Metadata
shows all 1,122 items and they are indexed by Spotlight. But, like before, the application itself shows no contacts.
I also have a Time Machine backup of Mojave, but because it was not set up with this computer, I cannot use it to recover contacts as in this blog post.
How can I recover contacts from my backup?