Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Time Machine using multiple backup disks ' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Time Machine using multiple backup disks
Authored by: jaydisc on Jul 06, '10 12:51:03AM
I wrote a shell script that rotates an unlimited amount of drives assuming they're named the same. I just use 'diskutil' to get the UUID and 'defaults' to update Time Machine's prefs:
#!/bin/sh
mountedDisk=`diskutil info "Backup HD" | awk '/UUID/ {print $3}'`;
if test $mountedDisk
    then
    echo "Mounted Disk UUID: $mountedDisk";
    configuredDisk=`defaults read /Library/Preferences/com.apple.TimeMachine DestinationVolumeUUID`;
    echo "Configured Disk UUID: $configuredDisk";
    if test $mountedDisk = $configuredDisk
        then
        echo "Configuration is correct."
    else
        echo "Configuration requires update. Updating..."
        defaults write /Library/Preferences/com.apple.TimeMachine DestinationVolumeUUID $mountedDisk
        echo "done."
    fi
else
    echo "No Backup HD found."
fi
I then set launchd to run it every time a volume mounts. More info, including how to encrypt the backup, can be found here

[ Reply to This | # ]