How to automatically back up Mac contacts
Automate offline backups
Simplify your backups
We're big fans of Time Machine, but it's not the be-all and end-all when it comes to backing up your Mac.
Every back-up routine should have checks and fail-safes built in. Multiple backups in multiple locations is good, so that if any of them should corrupt or be lost you can always revert to another.
Traditionally, this meant manually copying data out of your apps one by one, but that's no longer necessary. OS X's Automator knows all about the other apps Apple provides, like Mail, Contacts and Calendar, and both how and where they store their data.
That means it can rummage around inside their files and back things up on your behalf. Don't worry if you've never used Automator before, it doesn't require any manual coding and doesn't assume prior knowledge. Its functions are broken down into categories: all you need to do is drag them into the order in which you want them performed and the output of one will automatically be used as the input of the next.
Don't worry if your Automator categories don't exactly match ours as apps can add new abilities to it, so some may be missing on your Mac if you haven't got the same apps installed as us. In this tutorial we'll only be using Automator actions that are included with OS X.
1. Automate your workflow
Open Automator and select Calendar Alarm as the type of document you want to create. A document of this type will be triggered by events in your calendar, which means you can set it to run at specified intervals without any manual intervention on your part.
2. Filter your contacts
First, choose View > Arrange Actions by > Application. Click Contacts in the leftmost column and drag Find Contacts Items into the right pane.
This specifies what to back up. We want every contact, so leave the first two options as 'people' and 'All', select 'Name' and 'is not' for the others, and enter 'zzz'.
3. Test the results
Click Run on the main toolbar. If it works you'll see a green tick at the bottom of the window with the words 'Workflow completed' next to it. Click Results, immediately below the pop-up menus on the Find Contacts Items action, to check the action has selected all of your contacts.
4. Export your contacts
If that worked, drag in the 'Export vCards' action so that it sits below the first one in your workflow. Leave its first option set to 'one vCard' to save all records in a bundle, and select a destination from the second pop-up; we recommend a network drive to store the backup away from the originals.
5. Save and activate your workflow
Choose File > Save and name your alarm. Automator adds it as an event at the current time, in a calendar called Automator. Open the Calendar app and double-click the new event to customise it. Set it to repeat weekly (or daily) at a set time to provide a regular backup of your contacts.
6. Copy your content
You can take a more direct route to backing up by copying whole folders that can be reinstated on a new system. Apple publishes a list of locations that you should back up at , which is a good starting point for an Automator workflow.
7. Reveal the hidden library
In Finder, click Go while holding Options to reveal Library – click it to open the hidden folder. In Automator, create a new Calendar Alarm, select Finder in the left column, drag the Get Specified Finder Items action into the workflow, and drag the Calendars folder from the Finder window into the action.
8. Duplicate your data
Add the Copy Finder Items action and use its pop-up menu to choose a backup destination. If none of the default options suit, pick 'Other…' (choose a NAS if you have one).
Check the box beside 'Replace existing items', then save the workflow to add it to your calendar.
- Enjoyed this article? Get more tutorials, guides, and tips on how to get the most from your Apple devices inside MacFormat. Take advantage of an exclusive offer in our sampler today.
Nik is an Esperanto-speaking, pencil-bothering, manual typewriter fan who also happens to have a soft spot for tech after sufficient years in the business to know what that disk icon on the save button actually means. Never happier than when out in his campervan, coffee in one hand, ebook in the other, listening to the rain on the roof.