[CentOS] Backups on external USB HDD

Tue Nov 20 12:00:11 UTC 2007
David Ferreira <dferreira at izanet.com>

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 at email.com


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,
>
>     I'm trying to implement this:
>
> I have:
>
> - A windows 2000 server
> - A centos 4 server
> - Monday, Tuesday, Wednesday, Thursday, Friday, Monthly.
>
> The tape drive in the windows server died recently and I decided to 
> switch to USB external drives.  However, the USB controller in the 
> windows server is only 1.1, so it is very slow.
>
> I didn't want to install a 2.0 USB controller in the windows server 
> since it is a brand-name and I didn't want to make it unstable, so I 
> decided to make the backups of the windows server (using Backup Exec) 
> on the linux box.
>
> So backup exec writes on the linux box via samba, directly on the USB 
> drive. (I thought of writing on the linux box FS directly, then 
> rsync'ing to the USB drive), but the space available on the local FS 
> is about 90 gigs while the external USB drives are 250 gigs, meaning 
> that I can keep like 4 weeks of data on the USB drives (using backup 
> exec settings), while I could only keep 1 or 2 weeks otherwise.
>
> My questions is:
>
> -how can the USB drives be umounted/mounted automatically when the 
> person on site changes it (monday to tuesday, for example).  There 
> will always be only one HDD conected at the time.
>
> Thanks,
> Ugo
>
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
>

-- 
David Ferreira
Dpto. de sistemas
-------------------------------------------------------------------------------------------------
I Z A N E T - GLOBAL SERVICES S.L.
 
web: _http://www.izanet.com_ <3D%22http://www.izanet.com/%22>
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos/attachments/20071120/72d144eb/attachment-0004.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dferreira.vcf
Type: text/x-vcard
Size: 289 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20071120/72d144eb/attachment-0004.vcf>