What I'd do is the following. You need to create a copy of /Library/Preferences/com.apple.TimeMachine.plist
. Put it somewhere (example: ~/somewhere/com.apple.TimeMachine.plist.diskA
). Then change from System Preferences the disk to which you want to back up. Create another copy and put it to ~/somewhere/com.apple.com.TimeMachine.plist.diskB
). Then do something like this
ln -s ~/somewhere/com.apple.com.TimeMachine.plist.disk ~/somewhere/com.apple.com.TimeMachine.plist.diskB
sudo rm /Library/Preferences/com.apple.TimeMachine.plist
sudo ln -s ~/somewhere/com.apple.com.TimeMachine.plist.disk /Library/Preferences/com.apple.TimeMachine.plist
Then the script when using disk A would be
rm ~/somewhere/com.apple.com.TimeMachine.plist.disk
ln -s ~/somewhere/com.apple.com.TimeMachine.plist.diskA ~/somewhere/com.apple.com.TimeMachine.plist.disk
and when using disk B would be
rm ~/somewhere/com.apple.com.TimeMachine.plist.disk
ln -s ~/somewhere/com.apple.com.TimeMachine.plist.diskB
~/somewhere/com.apple.com.TimeMachine.plist.disk
This way you don't have to use sudo
with MarcoPolo (BTW you should really use ControlPlane which picks up where MarcoPolo left).
EDIT: REMEMBER to have your original file back'd up when you do this.