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
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-0005.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-0005.vcf>
On Tue, 20 Nov 2007 06:43:54 -0500 Ugo Bellavance <ugob at lubik.ca> wrote:> 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. >I can't answer on the auto mounting however, consider this - Run something like BackupPC on the Cent box. That in turn allows rsync to fetch from the Windows Server without the extra overhead of samba etc. We use BackupPC to archive many Linux and Windows Servers using the rsync method within BackupPC - I suggest BackupPC assuming you want a nice graphical front-end. -- Best regards, Chris I swear on tomorrow, if you take this chance, Our lives are this moment, the music - the dance. And here in this labyrinth of lost mysteries, I close my eyes on this night and you're all that I see.
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 0x00000000I 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 at 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
On Tue, 20 Nov 2007, Ugo Bellavance wrote:> 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.This is a very good question. I always wanted a system like this: - A program is hooked into the system's messagebus (dbus) - It understands when a certain USB disk is attached that this is a backup disk (either based on ID or media name or something else) - When the disk is connected, it wil automatically trigger an rsnapshot backup with the current timestamp - After it has finished it displays a graphical pop-up (or a wall message to all consoles) that the backup is finished and the disk can be unplugged. I am looking for a tool that can do this (both on Windows and on Linux). If such a tool exists in Open Source it would making backups very easy for companies or my mom and dad. (It is up to them in what frequency they make the backup, the default policy however is pretty broad) -- -- dag wieers, dag at centos.org, http://dag.wieers.com/ -- [Any errors in spelling, tact or fact are transmission errors]
On Nov 20, 2007 12:43 PM, Ugo Bellavance <ugob at lubik.ca> wrote:> 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.Longtime ago, I did the some on a ZIP drive. I used "automountd" I think, I'm sure about "auto" not about the remainder The ZIP drive was unmounted when unused for more than 5min. And remounted when trying to access is mounting point. I googled a little but did not find anything. Otherwhise you can suppose your employee will change the tape at a know time and add a script in the cron to dismount 1H before. Also you con dismount the drive using "plink" utility from window's putty package, from your windows server, when your backup is done!> > Thanks, > Ugo > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >-- Alain Spineux aspineux gmail com May the sources be with you
--On Tuesday, November 20, 2007 6:43 AM -0500 Ugo Bellavance <ugob at lubik.ca> wrote:> -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.This howto is targeted at Bacula users, but you might be able to adapt parts of it to your problem: <http://sourceforge.net/docman/display_doc.php?docid=47704&group_id=50727>
>-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.By a Stardome Enclosure, and at leas 3 disks. Then you always has the most current backup online in the raid - and the user just change disk for offsite storage. The enclosure is also much better build than normal singel disk usb enclosure - http://www.stardom.com.tw/sohoraid%20sr3610.htm "SR3610 series bundle with a hardware controller internally to provide with not only RAID 1 function for instant data" -- hs