Re: Backups on external USB HDD

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



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,

    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@xxxxxxxxxx
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
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

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux