The Mac’s Contacts app is extremely helpful for storing private and work contact information. This is learn how to again up your Contacts database.
macOS’s Contacts app lives within the /Functions folder on the root of your Startup Disk. Whenever you add new Contacts, every web page, or vCard is saved in a neighborhood database on disk at ~/Library/Software Help/AddressBook (the Contacts app was known as “Tackle E-book” in earlier variations of macOS).
There are a number of recordsdata and folders within the AddressBook folder however the primary Contacts database shall be named “AddressBook-vXX.abcddb” – the place “XX” is a few model quantity – within the case of macOS Ventura, often “22”. The .abcddb file sort is an opaque sort and Apple does not publish the specs for it.
Nonetheless, on the similar degree is a folder named “Metadata”, and on this folder are particular person Contacts, one for every entry within the Contacts app. At the moment, these recordsdata have an extension of “.abcdp” and you may double-click any one in all them to open the corresponding entry within the Contacts app.
In the event you’re not syncing your Contacts to iCloud, the AddressBook folder accommodates your total Contacts database. Settings for the Contacts app are saved in ~/Library/Preferences/com.apple.AddressBook.plist.
One simple approach to again up your Contacts database is to easily copy the whole AddressBook folder by holding down the Choice key and clicking and dragging it to a different storage location within the Finder. On any new macOS set up, you possibly can merely drop the AddressBook folder into the identical location within the person’s Library folder to revive your Contacts database to the brand new set up.
In the event you additionally wish to additionally copy your Contact app’s settings to a brand new macOS set up, merely copy the com.apple.AddressBook.plist file talked about above to the identical location on the brand new Startup Disk. You will be requested to exchange each gadgets every time, to which it’s best to click on “Substitute” within the Finder when requested.
As soon as you have copied all the pieces over to the brand new set up, Restart the Mac. Then open the Contacts app. You need to see all of your Contacts entries within the app. In the event you do not, there is a approach to restore your backed-up Contacts, which we’ll get to beneath.
However first, there’s one other approach to again up your total Contacts database from throughout the Contacts app. To take action, first ensure you have chosen “All Contacts” on the high of the sidebar on the left aspect of the Contacts major window:
Subsequent, select “File->Export->Contacts Archive” from the primary menu. A normal save panel will seem. Choose a file identify, and a location and click on the “Save” button.
Contacts archive export recordsdata are saved with a file extension of .abbu (for Tackle E-book Again Up), and are given a default identify of “Contacts – ” adopted by the present date. For instance:
Contacts – 05-16-2023.abbu
The .abbu export file accommodates a whole archive of all of the contacts in your Contacts app – assuming you clicked the “All Contacts” merchandise on the high of the sidebar earlier than exporting.
Pay attention to one long-standing intermittent bug within the Contacts export characteristic which Apple nonetheless has but to deal with: should you export the .abbu file to your Mac’s Desktop, on some events an incomplete archive shall be saved and a few particular person contacts could also be misplaced.
The circumstances below which this bug happens are nonetheless not absolutely understood – and it solely occurs typically.
To be secure, merely by no means save the exported archives to the Mac’s Desktop. Ever.
At all times put it aside to another location on a drive. Hopefully Apple will repair this problem in Contacts quickly.
You possibly can inform if this bug has occurred as a result of should you save the whole Contacts database to an .abbu file on the Desktop after which put it aside once more to a different location on disk, you may discover a big distinction in recordsdata sizes between the 2 recordsdata in Finder Get Data home windows.
This tells you some Contacts have been misplaced within the file with the smaller dimension.
As soon as you have exported the .abbu file, make a second copy of it in a secure location – ideally on media not often related to your Mac.
It’s also possible to again up single Contacts within the Contacts app, or Contact teams within the sidebar. To take action, merely click on a Contact entry or group within the Contacts listing or sidebar, and Management-click or right-click.
A context popup menu seems with an “Export vCard” merchandise in it:
Choose the merchandise and save the vCard utilizing the usual save panel. vCards are an open contacts format that are a part of the CardDAV commonplace.
Most fashionable working techniques and apps assist vCards. In macOS, vCards are saved with a file extension of .vcf.
In “Contacts->Settings” you may also select which model of the vCard commonplace to make use of below the “vCard” tab: at present variations 2.1 and three.0 are supported.
You possibly can export and import vCards at will so as to add or share contacts from the Contacts app. There’s additionally a “File” menu merchandise to export a vCard or group to a PDF file.
To revive your total exported Contacts backup, choose “File->Import”, and choose any .abbu file from the usual open panel that seems. You will be requested if you wish to change present Contacts with the contents of the opened file.
Click on “Substitute All” to exchange your present Contacts database with the one contained within the file.
Use this characteristic with warning as it’s going to fully overwrite any present Contacts you at present have saved within the Contacts app. You solely get one warning. There is no such thing as a Undo.
You possibly can restore or import any vCard or vCard group just by double-clicking any .vcf file within the Finder. If the vCard already exists in Contacts, it’s going to soar to that card. If not, it’s going to add the cardboard or group of playing cards after which soar to the primary one.
In the event you double-click a number of vCards within the Finder, Contacts will ask should you actually wish to import that many playing cards. Click on the “Import” button to import all of them.
It’s also possible to click on the “Assessment Duplicates” button to evaluation any doable duplicate playing cards earlier than importing them.
To save lots of indiviudal Contacts to iCloud, first go to “Contacts->Settings”, and within the “Common” tab, choose “iCloud” because the “Default Account”:
Whenever you do that, Contacts provides a “iCloud” heading in the primary window’s sidebar. Any Contacts you add below the “iCloud” heading will mechanically be synced to iCloud.
The headings within the Contact app’s major window sidebar work the identical means they do in Apple’s Notes app: there’s one part for native gadgets in your Mac, and one other for iCloud gadgets. The place an merchandise finally ends up is solely based mostly on which heading you retailer it below.
It’s also possible to transfer Contacts entries or teams just by dragging them from one part to a different within the sidebar.
In the event you return to the “Contacts->Settings” window, you possibly can flip off the iCloud sidebar header part once more just by selecting “On My Mac” for the “Default Account”. In the event you accomplish that, it does not delete any present Contacts below the “iCloud” header within the sidebar, it merely hides them.
To ensure that Contacts to be saved to iCloud, you will need to allow it in macOS’s Settings app. To take action, choose “Finder->Settings” in the primary menu, click on your Apple ID on the high of the window, log in if needed, then choose “iCloud” on the proper. On the following pane, click on the “Present All” button on the proper aspect of the window to point out all apps that assist iCloud:
Scroll right down to “Contacts” and switch its slider swap on. In the event you later wish to entry Contacts you saved within the app from iCloud on the internet, you will need to additionally scroll to the underside of the Settings iCloud pane and allow “Entry iCloud Knowledge on the Net.
Apple gives this safeguard to guard your iCloud knowledge ought to a foul actor acquire entry to your net iCloud account.
Because you now know the place the AddressBook folder lives within the ~/Library/Software Help folder, you should use a bash Terminal script to again it up mechanically.
A full backup script is past the scope of this text, so we’ll simply define the bash shell instructions you would possibly put right into a script to repeat the whole AddressBook from ~/Library/Software Help to another location on disk.
Remember that bash scripts will be fairly highly effective and may destroy your knowledge instantly if errors are launched right into a script. At all times take a look at your scripts first on a machine that does not include any precious recordsdata or knowledge. Proceed at your personal danger.
First, create a brand new empty .sh file in a textual content editor and put it aside to disk. Subsequent, add a number of variables to the highest of the script which point out the place the person’s Library, Software Help, and AddressBook folders dwell. Additionally add variables to carry the identify of the Startup Disk, the Customers folder, and the at present logged-in person’s identify:
VOL_NAME="/Volumes/Macintosh HD"
LIBRARY_DIR_NAME="Library"
APP_SUPPORT_DIR_NAME="Software Help"
ADDRESS_BOOK_DIR_NAME="AddressBook"
LIBRARY_APP_SUPPORT_DIR_PATH="${VOL_NAME}/${USERS_DIR_NAME}/${USER_DIR_NAME}/${LIBRARY_DIR_NAME}/${APP_SUPPORT_DIR_NAME}"
LIBRARY_ADDRESS_BOOK_DIR_PATH="${LIBRARY_APP_SUPPORT_DIR_PATH}/${ADDRESS_BOOK_DIR_NAME}"
The LIBRARY_APP_SUPPORT_DIR_PATH
variable now accommodates the ultimate full path to ~/Library/Software Help/
The LIBRARY_ADDRESS_BOOK_DIR_PATH
variable accommodates the ultimate full path to the AddressBook folder.
You will use the LIBRARY_ADDRESS_BOOK_DIR_PATH variable later to entry the placement of the AddressBook folder and duplicate the whole factor to another vacation spot location on disk.
To arrange names and paths to repeat the AddressBook folder to, add a number of extra variables to your script proper beneath those listed above:
DEST_VOL_NAME="${VOL_NAME}" # Backup dest vol identify
DEST_DIR_PATH="${VOL_NAME}/${USERS_DIR_NAME}/${USER_DIR_NAME}" # Backup dest dir path
On this instance, we’ll use the Startup Disk because the vacation spot quantity as properly, however you may use any mounted quantity identify, so long as it is indicated by “/Volumes/
On this case, we’ll simply use the person’s dwelling folder because the vacation spot folder in DEST_DIR_PATH.
Subsequent, set variables to outline the file paths to some native Unix binary instructions, particularly echo, take away, and ditto. ditto is a macOS command which copies recordsdata and folders completely, together with all their Unix person and group permissions, and all Entry Management Checklist settings, in addition to any Mac-specific possession and permissions:
As soon as all of your variables are arrange, it is pretty simple to repeat the whole AddressBook folder to the vacation spot folder.
First, change the present listing to the vacation spot folder utilizing Unix’s cd
command, then see if the AddressBook folder already exists there. If it does, take away it utilizing the rm command, else print a message to Terminal:
if [ -d "${ADDRESS_BOOK_DIR_NAME}" ]; then
${REMOVE} -R "${ADDRESS_BOOK_DIR_NAME}"
${ECHO} "${ADDRESS_BOOK_DIR_NAME} not current."
The -d flag signifies you wish to verify for a listing. Be extraordinarily cautious when utilizing the Unix rm command, particularly with the -R flag which implies “recursive”.
In case your cd fails or if you find yourself within the incorrect listing, the rm -R command will delete all the pieces within the current working listing blindly, no matter which listing it’s.
This contains total volumes, the system folder, the Desktop, the person folder, dwelling folder, the Startup Disk or another quantity or listing. Worse, you will not get any warning – your recordsdata will merely be gone immediately with no approach to get better them.
Because of this, it is all the time finest to check your scripts on a secondary boot quantity simply in case one thing goes incorrect. You may additionally wish to disconnect any important volumes out of your Mac earlier than working your script.
For this reason you all the time wish to verify for the presence of the listing you are deleting earlier than working the rm command. A extremely good script would additionally verify for the presence of any listing which the script tries to cd into – to make certain it exists.
If a listing you attempt to cd into from a script does not exist, the current working listing would be the final one used. You will not get any warning.
In the event you then run the rm -R command blindly, all the pieces within the current working listing shall be obliterated immediately. This is likely one of the gotchas Unix script newbies be taught the laborious means.
Subsequent, change the present listing to the ~/Library/Software Help folder utilizing Unix’s cd
command once more:
cd $"{LIBRARY_APP_SUPPORT_DIR_PATH}"
Examine if the AddressBook folder exists within the Software Help folder, and in that case copy it to the vacation spot, if not, print an error to the Terminal:
if [ -d "${ADDRESS_BOOK_DIR_NAME}" ]; then
/usr/bin/sudo ${DITTO} -v -V — rsrc "${ADDRESS_BOOK_DIR_NAME}" "${DEST_DIR_PATH}"
${ECHO} "${ADDRESS_BOOK_DIR_NAME} not current."
The sudo command is brief for “superuser do”. You will have to enter an admin password for a person in your Mac to proceed.
In Unix, a superuser is like the basis person, each of which have practically limitless permissions to do something on the machine they need.
The — rsrc
flag tells the ditto command to additionally copy any old-style Mac OS 9 useful resource forks which can be present in any copied recordsdata. On this case you most likely do not want — rsrc
, but it surely will not damage.
Save the script file. To run the script, open macOS’s Terminal app, drag the script file to the Terminal window and press Return.
The script will begin working and echo progress to the Terminal because it proceeds.
If all the pieces went in response to plan, you now have a precise copy of the AddressBook folder inside your present person’s dwelling folder. As talked about, you may copy the AddressBook folder to another location by altering the trail saved in $”{DEST_DIR_PATH}.
Automated backup scripts can get fairly advanced and you may automate nearly any file operation within the bash Terminal shell. We might have simplified this script by combining a number of the variables, and by nesting the if/else statements however the instance ought to be simple sufficient to grasp.
We might additionally export the Contacts archive from the app utilizing AppleScript, then again up the exported .abbu file additionally from the bash script – one thing we could cowl in a future article.
In a future article, we’ll additionally take a look at methods to again up Contacts out of your iPhone or iPad.