[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mounting USB disk



On 13/07/11 15:13, Andrew McGlashan wrote:
Hi,

Tony van der Hoff wrote:
Runnung Squeeze here. I have a script which runs nightly, to backup
certain directories to a USB disk, which does a fine job, provided the
disk is mounted.

Why not run blkid and if you find the "right" device by it's UUID, then
mount it in your backup script. Do the backup and then umount the device.

If the right device is not found, report that and quit the script.

Using the UUID via blkid is important because you want to be sure you
have the right backup device. A little harder if you have multiple USBs
for the backup, but then you could cater all of your known UUIDs

Thanks, Andrew, excellent suggestion, which works fine (except that I used the disk label). Don't know why I had such problems before :)

Thanks also to Csanyi, I did look into usbmount; a handy utility, of which I wasn't aware; but not needed on this occasion.

Cheers,
--
Tony van der Hoff        | mailto:tony@vanderhoff.org
Buckinghamshire, England |


Reply to: