[Klug-general] rsync and usb
Laurence Southon
laurence at southon.uk.net
Mon Sep 26 12:19:54 UTC 2011
On 25/09/11 23:20, sharon kimble wrote:
> I use rsync to back up my /home to an external hard drive using usb. Thiis
> the stanza;= /usr/bin/rsync -av /home/boztu/ /media/disk/`/bin/date +%Y%m%d`/
>>> /home/boztu/cron/backup.txt
>
> But occasionally when I plug the drive in after a reboot, it comes up with ;=
> /usr/bin/rsync -av /home/boztu/ /media/usb/`/bin/date +%Y%m%d`/ >>
> /home/boztu/cron/backup.txt
>
What OS?
Debian/Ubuntu has the 'usbmount' package that can ensure the disc is
always mounted in the same place. /media/usb0 by default, but
configurable in /etc/usbmount/usbmount.conf
usbmount can also write a file when it mounts the disc (and delete it
when it is unmounted). You can use this in a backup script to test that
the disc is actually mounted - and avoid writing the backup to the mount
point rather than the disc itself.
LS
--
Laurence Southon
Tiger Computing, Bexley
www.tiger-computing.co.uk
More information about the Kent
mailing list