I keep an external drive on my desk at work that I used as an off-site (ie not at home) backup. Because it could easily get taken I have a partition on it encrypted with TrueCrypt. I've got a script to mount this encrypted partition then do a backup via rsync then un-mount. It looks like:
truecypt /dev/rdisk1s2 /Volumes/untitled
rsync -myRsyncOptions /Users/me /Volumes/untitled/me
truecypt -d /Volumes/untitled
It works well, so long as my drive is seen as /dev/rdisk1s2. If not the script breaks. The trouble is that I need to point Truecrypt to the correct device file in order to mount the volume correctly. Sometimes the device file will change. Once the first line in the script works the rest of the script works.
Is there anyway I can use UUID or otherwise to ensure that my encrypted partition always gets the same device file attached to it so Truecrypt can mount it successfully? I've seen a few examples of using UUIDs in the /etc/fstab file but I don't think they apply in this case. Thanks!
