So, I now have both my data disk and the target disk for my backup automatically mounted when Ubuntu starts. I can simplify the bash script to eliminate the tests for the mounted disks, but I still have to run the bash script manually in order to start the backup process. Or, do I?
Well, of course, the answer is no. What I really want to do is have the script file included as a start-up application that will be executed when Ubuntu boots.
So, I navigate to System – Preferences – Startup Applications – Startup Programs and hit the Add button. In the Add Startup Program dialogue box that pops up, I specify:
Name = inosync Command = /home/toaster/inosync.sh Comment = Mirror DataDisk to BarracudaData
I press the Close button and, now, every time Ubuntu boots up, my bash script runs and inosync mirrors the contents of my data disk to my backup drive automatically – or – automagically!
References:
Autostart programs in Ubuntu
http://www.linuxscrew.com/2007/08/09/autostart-programs-in-ubuntu/