PDA

View Full Version : Script to run backup on mount


TheDesigner
06-26-2009, 07:31 PM
So I love SD, and it's actually made backups simple enough to where I ACTUALLY do them on a regular basis, but now that I have a new WD MyPassport drive (small, USB powered, perfect compliment to my MBP), I would like to automate the process even further to run right when I plug in the drive, and unmount the drive when its finished.

I don't plan on using this particular drive for anything else other than backups, so what I want to do is to find a script that starts SD and runs my regular backup when I plug in the drive, and at no other point. I don't tend to run my backups at the same time every day, and I don't keep this drive plugged in when it's not serving its purpose. Does anyone have an idea how I could script this, or is there a feature/script already out there that allows for this? Thanks in advance for all your help with this great product!

dnanian
06-26-2009, 07:59 PM
You can use the general steps in the One Touch Button FAQ entry, along with "Do Something When" (located on MacUpdate or VersionTracker), to accomplish most of this...

TheDesigner
06-27-2009, 01:25 PM
So I got Do Something When installed and running, but when I tried to point it to the symlink file I created using the FAQ you mentioned, I wasn't able to use it because DSW didn't recognize it as an application...any thoughts? I also found when I just tried to open the alias, it said that the original file could not be found, and when I pointed it to the saved backup file that you make from the scheduler, I get an Unexpected Error Code (-43). Any more help you could offer is greatly appreciated!

dnanian
06-27-2009, 02:21 PM
Sounds to me like the symlink wasn't created properly, actually. Try following the steps again...

TheDesigner
06-27-2009, 05:01 PM
Turns out I made a mistake in naming the source for the link...got it working now though...thanks!

dnanian
06-27-2009, 07:24 PM
Great to hear: congratulations.