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 and usbbackup, containing the backup script (remember to give exec permisions to the script): #!/bin/bash sleep 30 && \ HD=`e2label /dev/sda1` mount /media/$HD rsync -Pavz --delete /path/to/source/ /media/$HD >/var/log/hdbackup.log renice 20 rsync umount /media/$HD tail /var/log//var/log/hdbackup.log | mail -s "Backup log" destination@xxxxxxxxx The script is simplified, and the usbhd.usermap id's must be the correct for your usb HD's (use lsusb). I think It's a good aproach to you needings. Perhaps you need to adecuate or enhace the backupscript (mounting remote site which samba, better error control, compressing data, etc..)but now you now how to do it. Hi, --
David Ferreira Dpto. de sistemas ------------------------------------------------------------------------------------------------- I Z A N E T - GLOBAL SERVICES S.L. web: http://www.izanet.com Direcciónes: Argualas nº 3 (Planta calle) - 50.012 Zaragoza Teléfono: 902 999 065 y 976 306 752 - Fax 976 306 753 -------------------------------------------------------------------------------------------------- DISCLAIMER: Este mensaje se dirige exclusivamente a su destinatario y puede contener informacion privilegiada o confidencial. Si no es vd. el destinatario indicado, queda notificado de que la utilizacion, divulgacion y/o copia sin autorizacion esta prohibida en virtud de la legislacion vigente. Si ha recibido este mensaje por error, le rogamos que nos lo comunique inmediatamente por esta misma via y proceda a su destruccion. This message is intended exclusively for its addressee and may contain information that is CONFIDENTIAL and protected by professional privilege. If you are not the intended recipient you are hereby notified that any dissemination, copy or disclosure of this communication is strictly prohibited by law. If this message has been received in error, please immediately notify us via e-mail and delete it. |
begin:vcard fn:David Ferreira n:Ferreira;David org:Izanet Global Services;Dpto. de sistemas adr:;;c/ Argualas 3;Zaragoza;Zaragoza;50012;Spain email;internet:dferreira@xxxxxxxxxx tel;work:976 306 752 tel;fax:976 306 753 x-mozilla-html:TRUE url:http://www.izanet.com/ version:2.1 end:vcard
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos