My Digital Junk Drawer

The Problem

I recently setup Backblaze for backing my computer up to remote storage. I have Time Machine setup on my machine, but that backup goes to a local drive. That is great for recovering files that I mess up along the way, or restoring my system if I kill it while experimenting with something in the terminal, but in the event of theft, fire, etc. the time machine drive goes with the computer and I’ll have lost my data.

For the price, I couldn’t find anything that beat Backblaze as a backup solution. There is no limit to the amount of data they will store and by paying for two years up front, it worked out to less than $4/month. There is a minor catch though… there are a few things Backblaze won’t backup. The big one being the /Applications directory. Applications can be reinstalled, so I am ok with that. It is backing up all of my documents, music, movies, photos and all of the things I would be concerned with after a catastrophic event.

So the problem is this: I plan to use PHP and MySQL to work on some personal projects in the near future, so I have MAMP setup to run Apache and MySQL on my machine. MAMP’s root directory for Apache is in a directory that resides in a path under the /Applications/MAMP directory. So as it stands, Backblaze won’t back up those files. Right now that isn’t a problem, but I didn’t want to wait until it was to come up with a solution1.

The Solution

To solve this, I decided to use Automator to create a scheduled task to copy my htdocs directory onto an external drive2. I fired up Automator, created an iCal Alarm project, added the two required items to the workflow and saved it. It automatically launched an iCal event and I scheduled the backup to run daily.

The Problem with the Solution

Everything worked the way I expected it to and I found a need to run the same process and include another directory in my backup. This is where I got stuck. This might be my lack of knowledge and a wrong turn or two in my google searches, but I couldn’t find a way to access the workflow that had been added to my calendar to modify it. I found some mentions of a directory where it should have been stored, but it appears that this changed with Lion and I couldn’t find it anywhere, so it was back to the drawing board.

The Solution to the New Problem

My first thought was to scrap the original, create the workflow again and move on with my life, but that didn’t last long. It occurred to me that I would be less likely to add important items to my backup plan if I had to redo the work each time. That is a recipe for disaster, so I did a little digging around in Automator and found that you can run Automator workflows from other Automator workflows. So I quickly did the following:

  1. Created a new workflow as an Application
  2. Setup the same items that I had in my original workflow
    • Get Specified Finder Items
    • Copy Finder Items
  3. Added the directories I wanted to have backed up
  4. Saved the application to my ~/Scripts folder3
  5. Created another iCal Alarm workflow
  6. Added a “Run Workflow” action to it and pointed to my backup workflow
  7. Saved it and setup the daily schedule when prompted

Problem solved! And now, I can update the backup workflow whenever I have a need and the scheduled task will just run the updated version.

The Disclaimer

I got my mac about 4 months ago as of the day I’m writing this, so I am pretty green when it comes to some of the OSX specific stuff like Automator. There is a chance that I am doing stupid things or creating more work for myself. If you are a seasoned mac user and think I’m an idiot, please feel free to point that out in the comments, I’d be happy to learn.


  1. There may be a way to change MAMP’s default for this and I will look into that in the future, but this provided an opportunity for me to play with Automator and gave me something to write about. If I end up doing this in the future, I’ll post a quick how-to post on that as well. 

  2. Backblaze will backup connected external drives too, as long as they aren’t time machine volumes. I partitioned my external 1TB drive to create a volume that backblaze would backup. 

  3. This is a folder I created to store Automator workflows, shell scripts, etc. 

  1. avanslaars posted this
Blog comments powered by Disqus