A collection of scripts/utilities I've put together for Macs.

Backing up TimeMachine archives.

TimeMachine is a backup, so why would you want to back up your backup? Well, we recently had 3 hard disks die on us in one month. We lost one main disk, one backup, and one server disk. We didn't lose any data, but this convinced me that relying on anything other than a mirrored backup is very foolish! (Note that a mirror/RAID is NOT a backup by itself.) So I purchased a nice mirrored NAS, but in 10.5 and 10.5.1 (at least) TimeMachine will NOT backup safely to anything other than another Mac running 10.5.x over AFP. (It is not safe to use TimeMachine to SMB or non-10.5 AFP servers!)

So what to do? Well, I backup to a single FireWire drive attached to an old PowerBook and then have that PowerBook sync the TimeMachine backup nightly to the mirrored NAS. This should (hopefully) avoid the problems seen so far with TimeMachine to SMB and AFP servers.

Download: sync_timemachine.sh

Instructions:

  1. Download the script and make it executable (chmod +x sync_timemachine.sh)
  2. Modify the configuration to point to your backup, your server, and your account
  3. Add the password for the server/account into the System keychain by copying it from your keychain and pasting it into the system keychain. (This script gets the password from the keychain, but if it runs when a user is logged out it can only access the system keychain.)
  4. Test the script by running "sudo sync_timemachine.sh"
  5. Add the script as a launchd item to run as frequently as you'd like using Lingon.
  6. Load it by executing "sudo launchctl load yourscript.name"
  7. Test it by executing "sudo launchctl start yourscript.name" and check the output in the Console.
  8. Fix it as needed.

Add IPTC Keywords from Lightroom to filename

This script takes all the IPTC keywords in a JPEG file and adds them to the filename. Why do this? Well, all my previous files used the filename for keywordding, so I'd like to keep them that way (for now, at any rate). This also shows how to write a command line script that runs as a Lightroom post-processing script/Export Action.

Download: IPTC Keyword Rename for Lightroom

 

All contents Copyright © 2007 David Black-Schaffer. Permission to use them for non-commercial purposes is granted. All other use requires written permission.