I am trying to setup my Sun running samba 1.9.18p10 so that it can backup my dept's PCs. I can get it to work manually using the smbclient command with no problem. What I would like to do is have a script that is able to take a list of PCs, determine if a PC is online, backup that PC, then move on to the next one. If a PC is down, it can report an error to the admin to state that the backup was not performed. Does anybody out there have anything that might be able to help me out? Thanks in advance, Rick Johnson The Aerospace Corporation 310-336-3588 richard.l.johnson@aero.org
On Nov 18, 1998, Richard L Johnson <Richard.L.Johnson@aero.org> wrote:> What I would like to do is have a script that is able to take a list > of PCs, determine if a PC is online, backup that PC, then move on to > the next one.You'll probably like Amanda, at www.amanda.org -- Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org} oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org.au} Universidade Estadual de Campinas, SP, Brasil
> I am trying to setup my Sun running samba 1.9.18p10 so that it can > backup my dept's PCs. I can get it to work manually using the > smbclient command with no problem. What I would like to do is have > a script that is able to take a list of PCs, determine if a PC is online, > backup that PC, then move on to the next one. If a PC is down, > it can report an error to the admin to state that the backup was not > performed. Does anybody out there have anything that might > be able to help me out? > > Thanks in advance, > > Rick Johnson > The Aerospace Corporation > 310-336-3588 richard.l.johnson@aero.orgFunny, I was just writing this last night. We run it each night on a SunOS system, using cron to start it at 1am. #! /bin/csh if ($#argv == 0) then set fileno = 0 else set fileno = $1 endif set SMBC=/usr/local/samba/bin/smbclient cd /backup set TAPE=/dev/nrst0 set EXCLUDE=(windows dos xnfs orcadwin MAXPLUS2 emacs \ MSOffice wpwin60 Acrobat3 engr wpc20 DMI ATI PAGEMGR KPCMS OPLIMIT \ wpwin60 dell mouse vibra16 teac winmcad win32app acroread acrobat3 \ bsdl pkware ACADR13 DTEXT23 MCVHDL RECYCLED lotus Corel ACER) # Hosts with pcadmin remote access account # set hlist = ( peddlerII drachma kopek masada sappho tohoten shiva priam fujin ) set olist = ( steve sandra johnf glenn mike jean peggy paula jim ) set i = 1 while ($i <= $#hlist) date echo ping $hlist[$i] ping $hlist[$i] if ($status) then echo email to $olist[$i] for $hlist[$i] not available /usr/ucb/mail -s "Backup for $hlist[$i] failed" $olist[$i] \ < /backup/failed.msg /usr/ucb/mail -s "Backup for $hlist[$i] failed" backuplist \ < /backup/failed.msg else echo File ${fileno}: $hlist[$i] $SMBC \\\\$hlist[$i]\\c "ADMIN-PASSWORD" -TcbX 126 $TAPE \ "Program Files" $EXCLUDE >&! $hlist[$i].log @ fileno = $fileno + 1 endif @ i++ end
>Date: Wed, 18 Nov 1998 13:14:04 -0800 >From: Richard L Johnson <Richard.L.Johnson@aero.org> >To: samba@samba.anu.edu.au >Subject: PC Backup Script? >Message-ID:<03C713653389C107*/c=us/admd=0/prmd=aero/o=notes/s=Johnson/g=Richard/i=L/@MHS>> >I am trying to setup my Sun running samba 1.9.18p10 so that it can >backup my dept's PCs. I can get it to work manually using the >smbclient command with no problem. What I would like to do is have >a script that is able to take a list of PCs, determine if a PC is online, >backup that PC, then move on to the next one. If a PC is down, >it can report an error to the admin to state that the backup was not >performed. Does anybody out there have anything that might >be able to help me out? > >Thanks in advance, >Some time ago I wrote some perl scripts to something similar. The scripts make use of smbmount/smbumount. If interrested I send them over.
On Fri, 20 Nov 1998, Glenn Burkhardt wrote:> Funny, I was just writing this last night. We run it each night on a SunOS > system, using cron to start it at 1am.Good job ! Anyway, I do not have a tape backup. Is it possible to modify the script so that I can do do the backup at another HD instead of Tape device ? Thanks. Panyarak Ngamsritragul Department of Mechanical Engineering Prince of Songkla University.
Try these scripts, which use amanda. http://www.geocities.com/SiliconValley/Park/9276/sambascripts.html ------------------------------ I am trying to setup my Sun running samba 1.9.18p10 so that it can backup my dept's PCs. I can get it to work manually using the smbclient command with no problem. What I would like to do is have a script that is able to take a list of PCs, determine if a PC is online, backup that PC, then move on to the next one. If a PC is down, it can report an error to the admin to state that the backup was not performed. Does anybody out there have anything that might be able to help me out? Thanks in advance, Rick Johnson ------------------------------ http://members.spree.com/sip/shokk/ http://www.geocities.com/SiliconValley/Park/9276 - ICQ# 17933910 _____/ ____ / /Ernie Oporto-SysAdmin _____ ____ / \ __ / __ / Mentor Graphics Corporation \______/ __ __ \______/ __ \___ __ \___ Ernie_Oporto@MentorG.com