kcw | journal | 2000 << Previous Page | Next Page >>

Upgrading to Mac OS 9 means that Speed Doubler no longer works. Although the only Speed Doubler feature that I used was automated file copy, that was rather important since I use it to automate my backups. So now I needed to provide another way to do automated backups. I've looked at backup programs before, and decided not to use any of them because they all cost some amount of money (or were rather poor solutions).

The solution I have implemented requires using the File Synchronization control panel, along with AppleScript and iDo Script Scheduler. In summary, File Sync is set up with lots of one-way links to backup files and folders; iDo Script Scheduler runs an AppleScript script which mounts the fileserver, starts File Sync, then kills File Sync.

The problem with File Sync as a general backup tool is that it constantly checks to see if files have changed. In automated mode, it'll recheck one minute after the last check completed. I have thousands of files to backup, so checking over the network takes over six minutes and is a bit of a drain on both computers. If you just leave File Sync open, it'll compromise system performance for little benefit, since files don't change that often.

Another smaller problem is that File Sync is more geared toward folder backups than file backups. The interface is rather inefficient, only showing a few of the files/folders at a time. So my particular setup has 3 folders and some dozen or so files (in the Preferences folder, which I don't want to backup wholesale). You also can't rearrange the order, it syncs in the order you added the files/folders. Still, it comes with your system software and is a relatively quick program.

I better explain what I mean by backup. I don't mean archiving, wherein you store old copies of files so that way you can see what this file looked like a year ago. That would take too much space and time. I just want a copy of all my files on another computer so that if something bad happens to my PowerBook I still have a relatively recent copy of my data. Backing up daily suffices for my needs.

So the next objective is to open the control panel for a few minutes, then close it so that it doesn't interfere with both computers. AppleScript is a perfect solution, as it's included in the current OS and is relatively simple to use. The AppleScript language is not that simple, it would probably take a person a couple of weeks to learn the semantics and language, although taking an existing script and modifying it a bit can be done by anyone with any sort of programming experience. I've already taken the time to learn AppleScript, but I don't use it much so I'm constantly forgetting the syntax. Therefore I tend to use other people's code (or my old code) as a starting point.

iDo Script Scheduler is a control panel and extension made by Sophisticated Circuits, the guys who make PowerKey products to restart your Mac based on a variety of conditions (including just calling the PowerKey). iDo can run any AppleScript at predetermined times. The free version is limited to three jobs and the full version can also run jobs based on idle time. It's a good, simple product that's a lot cheaper than other cron programs on the Mac.

Another possibility is to just have the AppleScript run in the background, checking every minute to see if it's time to run the backup. In general that just means more code and more debugging, which you should strive to avoid. That and AppleScript programs aren't all that fast, although much faster than early releases of AppleScript. I don't want to set a precedent that way since that will mean that future scripts will also run in the background and slow down my system. Better to have a cron program to do the work, and I don't want to write one myself. It's easier to write a simple program that does one thing than a general program that's supposed to be a foundation and therefore robust and complicated.

Tomorrow we'll take a look at the backup script.

Copyright (c) 2000 Kevin C. Wong
Page Created: August 17, 2004
Page Last Updated: August 17, 2004