Let’s face it- Even if you are using a trouble-free Mac, you will eventually have something go wrong. Data-destroying disk errors will occur, a hardware component might fail, or maybe the latest hurricane blows a tree into your house, destroying your lovely new iMac. Regardless of how it happens, something has gone wrong, and you’re now stuck without access to all those important things that were stored on your computer.
Fear not!!! You have a recent, and comprehensive backup. What, you don’t have one of these?? You’ve never heard of such?
Well, if the above questions apply to you, you are in very good company. The SINGLE most effective thing we can do, as computer users, to protect our important data from mishaps is to make backups. To make these backups frequently, and to insure that they are comprehensive. Sadly, most of us do not do this one simple thing, and for good reason..
Computers (even Macs) do not come with an easy-to-find button that reads, “Make A Backup.” Commercial backup software might provide such a feature, but who wants to pay that kind of money? Why can’t a “backup feature” be built into the OS?
The answer is: “It has been!” OS X 10.4 includes a powerful command-line tool called “rsync” that can make backups for you, and do so with incredible flexibility. Now, before you run screaming from your Mac at the mention of “command-line,” let me reassure you that you need not be a “Terminal Wizzard” to use this. In fact, we’re going to make it as easy as double-clicking a file on your Desktop. We’re even going to call that file “Make Backup.” Is this starting to sound like that aforementioned “easy-to-find button?” You bet it is!
The first thing you will need is somewhere to keep your backup. Without question, you will need an external Hard Drive, either Firewire or USB 2. The Hard Drive should be large enough to comfortably accommodate everything you will store on it (the larger, the better), and it should be formatted as Mac OS Extended (HFS+). In the Finder, look on your Mac’s Hard Drive for the “Users” folder. Select it, then press Apple-I to open a Getinfo window for it. The capacity of your external Hard Drive should be at least double what is reported in this Getinfo window for the size of your “Users” folder.
Connect your external Hard Drive to your Mac. We will assume that you already know how to format it as Mac OS Extended using Disk Utility, and we will further assume that it is already “mounted” on your Desktop. Before you begin using it to make backups, there are a few steps you must take to insure that your backups remain comprehensive, complete, and secure. First, you must verify that “ownership and permissions” are not ignored on this external volume, then you must “give” ownership of it to “system:”
* Select the icon for your mounted external drive, then press Apple-I to open a Getinfo window for it. At the bottom of the window, you will see a check box for “Ignore ownership on this volume.” Make sure that this box is not checked.
* Next, open /Applications/Utilities/Terminal. At the prompt, copy and paste this text into the Terminal window:
sudo chown root:admin
After this text, type a single space, then drag the external drive’s icon from your Desktop to the Terminal window. The full “path” to the external drive will be automatically filled in after the space you typed earlier. Now, press RETURN. You will be asked for your admin password. Enter it, then press RETURN again. Quit Terminal.
Now for the fun part! Download the “Make Backup” Automator Action. Next, open /Applications/Automator. From Automator’s “File” menu, choose “Open…,” then navigate to the downloaded file. Automator will show you that the downloaded script contains two linked “actions,” each represented by a “pane” in the workflow at the right side of the window.
* The first action is the “ask for text” action. At the top of the action pane, drag to select the text “CHANGE ME,” then type the name of your external drive (replacing the text you selected).
* Next, take a look at the second action pane. This is the “run shell script” action, and it will do all of the real work when it comes to making your backup. This is how the text reads:
sudo rsync -avE --delete /Users/ /Volumes/"THE NAME OF YOUR DRIVE" /Users >> ~/Documents/Backup.log
You must drag to select “THE NAME OF YOUR DRIVE,” but select only the text, and leave the quotes in place. Once selected, type the name of your drive, exactly as it appears on your Desktop. What you end up with should look something like this:
sudo rsync -avE --delete /Users/ /Volumes/"Fred's Drive" /Users >> ~/Documents/Backup.log
* Finally, choose File>Save
You are now ready to use your Automator “Make Backup” script! With your external drive connected, simply double-click the “Make Backup” icon. The script will ask you for your admin password. Enter it, then click “Continue.” That’s all there is to it! While it is running, you will see an Automator icon in your Menu Bar (at the top of your display), and the first time you run it, it might take several minutes to complete. Subsequent “updates” of your backup will take mere seconds. Also, this script will record everything it does, and leave that record in a “.log” file in your HOME Documents folder.