If you connect the USB flash drive the workflow icon will show up in the status bar and it will disappear if the script has been finished.Īfter the workflow has finished you should see the new USBBACKUP folder in your home directory, the backup folder for the flash drive and the rsync logfile for that drive. Save the folder action and give it a meaningful name. $RSYNC $RSYNCOPT $folder $BACKUPFOLDER -log-file=$BACKUPFOLDER/$name.log The automator action can be downloaded at (. If you use Mountain Lion you can add a automator action for the Notification Center after the bash script that will run rsync if the name of the USB flash drive matches on of the names in the USBNAMES array. Input the bash script that will run rsync if the name of the USB flash drive matches on of the names in the USBNAMES array. Now the Volumes folder shows up in the file dialog. Open the folder dialog to select the /Volumes folder as the trigger for the folder action.īecause /Volumes is not visible in the finder and in the file dialogs you must use This triggers the folder action we will create nowĬhoose to create a new folder action in the new document dialog. If you plug in a USB flash drive, a folder with the Name of the drive will be created under /Volumes and the drive will be mounted under this directory. A folder action we be started if something changes inside a folder. Start the Mac OS Automator to create a new folder action. I use the automator and a bash script that starts rsync to do a incremental backup of the files on the USB drive. A Macbook pro is my main notebook and because of that i use it to make regular automated sync’s of my USB flash drives to the local disk. I use USB flash drives to store all the little tools, scripts and config files i need to switch between Mac, Linux and Windows.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |