Hi
If Device 009 is your USB HD, then, your /etc/hotplug/usb/usbhd.usermap sould look like that:
#usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info usbbackup 0x0003 0x04fc 0x0c25 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
Well, now the script. only one question, Do you use backup exec to write on linuxbox fs and then, rsync to the usb hd?, or do you want to backup exec directly backup to the usb hd? If you do a rsync from local linux fs to the USB disk, you can umount the fs in the script when it's finish. If you choose the second option (Backup diretly to the usb hd) you sould find other way to umount the usb drive once you have finished backup (I think the easiest way is a cron job). I think first option is beter, so you can use this pseudo-script in /etc/hotplug/usb/usbhd:
#!bin/bash mount -t auto /dev/sd0 /mnt/backup rsync -Pavz --delete /tmp/backup /mnt/backup umount /mnt/backup
If you prefere second option, you must made accesible /mnt/backup as you prefer to your windows box, quit rsync and umount from script, and create a cron job to umount the usb drive. I think now is enough clear what do you have to do.
Greetings, David
Ugo Bellavance escribió:
David Ferreira wrote:
I've used simple scripts for similar backup system. I used hotplug facilities and rsync to avoid copying inecesary data. You must see the USB id which lsusb
in /etc/hotplug/usb/ create the folowing two files: usbhd.usermap containing the folowing line: usbbackup 0x0003 0x05e3 0x0702 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
I don't need the script, I just need the windows box to be able to write to the external HDD, and that the external HDD can be changed (not when writing, of course) without any manual intervention.
This is the output of lsusb
[root@server]lsusb Unknown line at line 5959 Unknown line at line 5960 Unknown line at line 5961 Unknown line at line 5962 Unknown line at line 5963 Unknown line at line 5964 Unknown line at line 5965 Unknown line at line 5966 Unknown line at line 5967 Unknown line at line 5968 Unknown line at line 5969 Unknown line at line 5970 Bus 004 Device 001: ID 0000:0000 Bus 003 Device 001: ID 0000:0000 Bus 002 Device 001: ID 0000:0000 Bus 001 Device 009: ID 04fc:0c25 Sunplus Technology Co., Ltd Bus 001 Device 001: ID 0000:0000
The device is most likely 001/009 (Sunplus).
lsusb -v shows this (stripped output):
Bus 001 Device 009: ID 04fc:0c25 Sunplus Technology Co., Ltd Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x04fc Sunplus Technology Co., Ltd idProduct 0x0c25 bcdDevice 1.03 iManufacturer 2 Sunplus Technology Inc. iProduct 3 USB to Serial-ATA bridge iSerial 1 WDC WD2500 WD-WXE807734118 bNumConfigurations 1
How would I build my usbhd.usermap file?
Regards, Ugo
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos