Using “DSW” to Automatically Backup You Flash Drive
December 18, 2007 – 12:53 pm
OS X.5 came with a cool new feature called Timemachine which automatically backs-up your internal Mac harddrive. People like me live off their flash drive, and losing it would mean disaster, and you can never remember to manually back it up. When I learned that Time Machine didn’t backup external drive I was disappointed. Enter “Do Something When.” A program that will execute a script, or application anytime we mount a new drive. Check the link below to get DSW
First you need to create the script to backup your drive. You can copy and paste this code into Script Editor and save it somewhere as MyScriptName.
do shell script "rsync -rt /Volumes/MyUSBDrive/
/Volumes/TMBackup/MyUSBDrive_Backup"
display dialog "Backup Complete"
Be sure to change MyUSBDrive and TMBackup to the name of your USB Drive and your Time Machine Backup drive.
Once DSW is installed, plug in your drive and tell it “When MyUSBDrive mounts run application My script name” Then tell it to start DSW automatically when the computer turns on.
You’re done. Now everytime you plug in you USB drive you will have it backed up on your Time Machine Backup
Some of my friends have said that backing up large flash drive can cause lag on their system, and would rather be prompted to back up then automatically backing up. In order to do this use this script instead of the one above:
display dialog "Backup your flash drive?" buttons {"Yes", "No"} default button 2
if the button returned of the result is "Yes" then
do shell script "rsync -rt /Volumes/MyUSBDrive/
/Volumes/TMBackup/MyUSBDrive_Backup"
display dialog "Backup Complete" buttons {"OK"} default button 1
else
display dialog "Backup Canceled" buttons {"OK"} default button 1
end if
Remember to save the script as an application in order for DSW to be able to run it.
>Get DSW <
10 Responses to “Using “DSW” to Automatically Backup You Flash Drive”
Or get Corsair Drive Tools here:
http://www.houseofhelp.com/forums/showthread.php?t=62197
Especially if you need to keep a full sync between Mac, Windows and the flash drive.
I’ve been using it for a while. It has its rough edges, being a beta and all, but it does work.
By Michel Clasquin-Johnson on Dec 20, 2007
Nice.
By Shahid N. Shah on Dec 22, 2007
Got a huge error every time I tried to run it. I think the problem might be that my flash drive is FAT formatted. Would that be a dealbreaker with rsync?
(Unfortunately I have to use FAT formatting because I use the drive on a PC as well)
By Damian on Jan 10, 2008
That should not be an issue. I use FAT as well. What error are you getting?
By Amir on Jan 10, 2008
This thing seems to be awesome, however I get this big message explaining some stuff about rsync …
i can send you a snapshot of my screen when this happens …
By Sahand Karimi on Mar 18, 2008
I have a similar issue where I get an rsync error because it doesn’t seem to be able to see the volume. I have a screen capture of the error for any that are interested
By RJ on Jun 5, 2008
I get an apple script error
sh: line 1: /Volumes/HD2/usbbackup: No such file or directory
If I create a folder named usb_backup I get an apple script error that reads
sh: line 1: /Volumes/HD2/usbbackup: is a directory
By Don on Feb 11, 2009
I get the error
sh: line 1: /Volumes/Lloyd/CHELSI_Backup: is a directory.
I’ve created the folder CHELSI_backup in Volumes/Lloyd.
TMBackup = Lloyd
MyUSBdrive = CHELSI
Any help?
By Dude on Apr 13, 2009
Hi!
I just installed DSW and made the script and have tot tell you that it works like a charm! Thanks a lot for the information!
Currently I am backing up to the macbook’s harddrive, may change that when I have a TimeCapsule of course.
I am using this with a FAT formatted drive as well by the way, no issues here.
By Simon on Apr 27, 2009
Your two example scripts worked perfectly. Thank you!
By Steven Vance on Nov 15, 2009