I have a hotswap sata drive that I use for backups on a PC running Ubuntu 12.04LTS. When I insert the drive it shows correctly on the desktop and I can double click the icon to show the contents of the device.
I want to write a script to copy certain files from the pc onto the removable drive, but I am having trouble mounting the hotswap drive as I never know what device id it will have allocated.
When I first insert the drive it allocates it as /dev/sdf1, but if I remove the drive and re-insert it, it allocates it as /dev/sdg1. How do I write the mount command (or copy command?) so I can find the drive id?
This is what I have:
sudo mount /dev/sdf1 /media/128GB_SSDcp /home/dfsql01/dumps/*.sql /media/128GB_SSD/SQL_Backups
`sudo umount /dev/sdf1