How to Create a Time Machine Backup Reminder Alert
Posted 06/26/2012 at 10:00am
| by Cory Bohon
If you’re not lucky enough to have a fancy NAS set up or a Time Capsule to back up your Mac with, then you need to rely on good ol' fashioned external drives for the arduous task of backing up to Time Machine. Unfortunately, this method isn’t the best because it relies on physically plugging in a drive to conduct a backup and -- let’s face it -- we sometimes forget to do that. Fortunately, with iCal and an AppleScript, you can set timed reminders to remind you to do so.
What You’ll Need
>> Mac running OS X 10.7 (Lion) or higher
>> iCal
1. Enabling the AppleScript
With the AppleScript below, TimeMachine will pop up to remind you to attach the external drive and click continue. The script will then execute the Terminal 101 command from last week called “tmutil startbackup,” which will tell Time Machine to begin backing up your Mac.

To get started, open the AppleScript Editor (located in Applications/Utilities/), and copy/paste the following AppleScript:
-- display backup dialog
display dialog "Time Machine Backup Script: If you wish to backup Time Machine now, please attach your Time Machine backup drive and click Continue." buttons ["Cancel", "Continue"] default button "Continue" with icon note
--if user continues, execute time machine backup terminal command
do shell script "tmutil startbackup"

Once pasted in to the AppleScript editor, save the script by navigating to File > Save (or by pressing Command + S), and specify a file name and location for the script. Before clicking Save, ensure that “Application” is selected from the “File Format” drop-down menu.
2. Setting up the iCal alarm
Next, head to iCal, where you will create a new calendar. We’ll call ours “Backup Schedule.” After that, add a new event for the day(s) of the week that you wish to be reminded to backup your Mac.

In the event details, select “Open File” from the Alert-type drop-down menu, and then in the next drop-down menu choose “Other” and locate the Application format AppleScript that you saved. Select how many minutes before (or after) the event time you’d like the script to run.
In the Repeat drop-down menu, you can select the schedule that you wish to repeat (every day, every week, every month, or every year). You can also customize the schedule to the days of the week to repeat by selecting Custom.
3. Putting it all together
Once the iCal scheduled time lapses, iCal will automatically open and run the script for the Time Machine backup.

You will get a dialog box asking you to plug in your external hard drive containing your Time Machine backups and press Continue to have Time Machine backup your drive.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article's author, Cory Bohon on Twitter.