Although the External HDD is "automounted" by #!, it needs to be woken up by clicking on it in thunar before running my rsync scripts. How to wake it up through the script ?
ls /media/SAMSUNGD3 > /dev/null
How does ls "wake it up" when the drive isn't mounted? Isn't that what clicking it in Thunar does?
You are quite right. When I tested, the drive was already mounted but had spun down, since a reboot spotted my error. Have edited previous post accordingly. I thought it was automounting and mounted as it was showing in Thunar in the list on boot without doing anything to it. Simplest solution is to get fstab to do the work. The ls command just makes sure the drive is spun up now.
I use my linux server for backups also. It will detect when a particular external HDD is connected then run a bash script to rsync everything i defined then unmount the drive and email a compressed log to myself. its been running for a few months now and i just connect the external hdd up to the server once or twice a week using alternating drives (one i keep offsite in the safe at work).
i found it to be handy to do it this way over scheduled backups as the HDD did often goto sleep and dismount itself which i found to be annoying.
batmans a scientist!