Where does System Preferences store the name of the Time Machine Destination
The tmutil utility does exactly that, but I think it was only added in Lion.

As an added bonus, Apple doesn't document the tmutil argument you'll need, but I dug through the output of "strings /usr/bin/tmutil" and found this, which is what you're looking for:


  tmutil destinationinfo


Also, "tmutil status" will tell you if a backup is currently running. It's another undocumented command.