When OSX came out there were three new features that Steve ranted on about. The first was Spotlight, which I use a lot and really like, the second was Dashboard, which a quick scan of the articles in the Mac section of my blog will clearly show I like a lot, and the final one was Automator, which I’ve really neglected. I never even bothered to play with it properly until today! But, better late than never and since I had a free hour and some backups I wanted to automate I figured I’d give the classic rsync shell script approach a miss this time and see what Automator could do for me.

Introduction

In case you’re not familiar with Automator the idea behind it is that you can write scripts to automate repetitive tasks or tasks that you do a lot but without typing or seeing a single line of code. For the full Apple hype have a look at the Automator page on the Apple Site.

So, the question is, does Automator live up to the hype? Well IMO it does. It did take me a few minutes to get into the swing of things and I have to say I’d probably never have figured it out without looking at the sample workflows but once I got into it it was dead easy. You just drag and drop in the actions you need in the position you need them and then tinker with the options on each action until you have what you need. Something I found really helpful was that you can create complex workflows by chaining together simple ones. I initially started by trying to write one killer workflow that would deal with all elements of my backup but I soon realise I would be much better off breaking the task up and then creating the killer workflow by adding together all my small workflows.

My Experimental Workflow

I wanted to back up to a SAMBA share that is not that big so I was only interested in backing up important stuff. To me important stuff meant:

  1. My email
  2. My FireFox bookmarks
  3. My Work Documents

So, I started by creating a simple workflow to archive my Thunderbird folder to my desktop, move it to a folder on the share and then re-name it with the current date. Then I used that as a base for creating similar flows for my FireFox settings and my documents. Finally I tied all this together with a flow that did the following:

  1. Connected to the samba share
  2. Ran the three backup flows
  3. Ejected the samba share

Within 30 minutes of starting to play with Automator for the first time I had the above done, tested and working. I can now very easily and very quickly backup my important stuff to my samba share.

Below are some screenshots of some of my workflows to give you an idea of what the interface is like.

Automator Workflow for backing up Email

(above) The workflow for backing up my email.
(below) The workflow that ties all my small workflows together

Automator Workflow for backing up all my important data

Not Perfect

However, there are a few things that annoyed me, firstly, Automator crashed once when it had just finished saving a workflow. I’m not accustomed to Apple programs crashing so that worried me a bit but it only happened once and since then I’ve been poking around with automator for hours with no more crashes. The other thing is that I can’t get the action for disconnecting from the share to work. I’m not sure if the problem is with Automator or with OS X’s samba. Mind you samba support on Tiger has been flaky to say the least so it doesn’t really surprise me that Automator has some issues with it. The important thing is that it can connect to the share which it does without problems.

Conclusions

Automator delivers on it’s promise of letting you do powerful things all within a simple drag and drop interface. The range of actions available is simply phenomenal ranging from simple sysadmin tasks like moving and copying files or running shell scripts to automatically burning backups to CD and automatically processing entire folders of images. Automator also integrates with just about every Apple program so you can automate more tasks than I could possibly describe here. To get some idea of how many actions there are have a look at the screenshot of the action browser pane below. Yes, it crashed on me once but I’m still very happy with it and will be using it a lot.

Some Automator Actions