This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C3E482.6ADD3830
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C3E482.6ADD3830"
------_=_NextPart_001_01C3E482.6ADD3830
Content-Type: text/plain;
charset="iso-8859-1"
-----Original Message-----
From: Brzozowski, Dwayne
Sent: Monday, January 26, 2004 8:31 PM
To: 'Hart, Charles'
Subject: RE: [Veritas-bu] NOPHI Command Line control of Client Exclusion
lists?
Ok, here they are First of all, I'll explain what I am doing, hosts
involved, etc. before I start posting scripts. I have a customer with an
E10K , all Solaris 8, with 5 domains, with Oracle running on each. Some
instances are up each night, and some are down. I only want to back up those
instances that are down and exclude those instances that are up. On each
server, I have a script that checks for instances of smon that are up and
puts that into an exclude_list, in netbackup directory, on each server. I
chose one of those servers as my "home base" for everything, master scp
scripts, log files, munging log files, and pushing new master list out. .
>From this server, I created a RSA (ssh-keygen -t rsa), dsa won't work, key
with ssh, with no password, and put that key in my authorized_keys
($HOME/.ssh/authorized_keys) file on all 5 servers. For this script to
work, no passwords can be used when generating this key. Since ssh is being
used under my identity, it still adheres to federal security guidelines, so
this does work. To ensure this works, once the key is generated/copied,
from the home server, ssh to each box, you should not be prompted for a
password. These scripts run very quick, which they must as I have only 19
minutes for everything to run, start to finish.
-First script, runs locally on each of the 5-Solaris clients running Oracle.
It took a while to time this to see when the actual Oracle databases are
shut down. Those scripts are controlled by the dba's so this had to be timed
to run when those are shutdown, but with time to complete the rest of the
scripting before the backups actually begin, which is 15 minutes later,
2230( 10:30pm) This runs at 2016(10:16pm) when databases are shut down to
check for up instances:
I will also attach each script at the end.
this is first exclude_list.ksh-run in root's cron
#!/usr/bin/ksh
/usr/bin/ps -ef | grep ora_smon | grep -v grep | \
/usr/bin/nawk '{print $1}' | \
/usr/bin/nawk -F 'ora' '{print "/U0*/"$2"/"}' >
/usr/openv/netbackup/exclude_list
#to add the secondary copy area to the exclude list-added by t314djb
#on 3/10/2003
#/usr/bin/echo "/U07/stage/" >>/usr/openv/netbackup/exclude_list
#/usr/bin/echo "/U05/stage/" >>/usr/openv/netbackup/exclude_list
/usr/bin/echo "/tmp/" >>/usr/openv/netbackup/exclude_list
/usr/bin/echo "/proc/" >>/usr/openv/netbackup/exclude_list
/usr/bin/echo "/dev/fd/" >>/usr/openv/netbackup/exclude_list
/usr/bin/echo "/etc/mnttab/" >>/usr/openv/netbackup/exclude_list
this is the get_exclude_list.ksh scripts-I call the Master script that runs
in my crontab. Frey, which is my home base for these scripts is where this
resides. This script does the following:
-pulls the exclude_list, via scp, from each server
-takes those 5 files, all with new name of exclude_list.$host,
-put all data into one file
-remove duplicate lines from new file, push that file into $HOME on other
clients
Here's the master exclude_list script:
ps-you'll see a lot of duplicate lines. This script echo's to a log and to
screen because I sometimes have to run this manually for emergency backups
and it saves time to see exactly what's happening.
#!/usr/bin/ksh
#Written by Dwayne J. Brzozowski
# in June, 2003
#to address exclude_list problem
#
#cleaning out exclude_lists before beginning
hosts=`cat /export/home/t314djb/scripts/corefls_hosts` #list of
whatever hosts you want this list pushed out to, one host per line
scp=/usr/local/bin/scp
MYTEMP=/export/home/t314djb/bin/temp
MYLOG=/export/home/t314djb/bin/temp/exclude.log
MYBAK=/export/home/t314djb/bin/temp/BAK
DATESTAMP=`/usr/bin/date +"%y%m%d"`
/usr/bin/mv /export/home/t314djb/bin/temp/exclude_list* $MYBAK
/usr/bin/touch /export/home/t314djb/bin/temp/exclude_list
echo "" >$MYLOG
/usr/bin/date >>$MYLOG
echo " Getting exclude_list from frey, frigg,skadi,odin,and loki....."
echo " Getting exclude_list from frey, frigg,skadi,odin,and loki....." >>
$MYLOG
for host in $hosts ;
do
echo ""
echo " $host... "
echo " $host... " >>$MYLOG
echo ""
echo "" >>$MYLOG
$scp $host:/usr/openv/netbackup/exclude_list
$MYTEMP/exclude_list.$host
echo copied $host
echo copied $host >>$MYLOG
echo ""
done
echo ""
echo "" >>$MYLOG
echo " Putting all lists into one file....."
echo " Putting all lists into one file....." >>$MYLOG
for host in $hosts ;
do
echo ""
echo " $host... "
echo " $host... " >>$MYLOG
echo ""
echo "" >>$MYLOG
cat $MYTEMP/exclude_list.$host >>
$MYTEMP/exclude_list.allhosts
cat $MYTEMP/exclude_list.allhosts |sort -u
>$MYTEMP/exclude_list
done
echo ""
echo "" >>$MYLOG
echo "Now scp'ing new exclude_list to my $HOME/nb on frey,frigg,skadi,odin,
and loki"
echo "Now scp'ing new exclude_list to my $HOME/nb on frey,frigg,skadi,odin
and loki" >>$MYLOG
for host in $hosts ;
do
echo ""
echo " $host... "
echo " $host... " >>$MYLOG
echo ""
$scp $MYTEMP/exclude_list $host:/export/home/t314djb/nb
done
echo "New root cronjob will cp exclude_list to /usr/openv/netbackup on each
box"
echo "New root cronjob will cp exclude_list to /usr/openv/netbackup on each
box" >>$MYLOG
echo "" >>$MYLOG
echo "2nd script local to each host will cp list to NB dir in a few"
>>$MYLOG
echo "This cp script will also compare file in this dir" >>$MYLOG
echo "with NB exclude_list datestamp...." >>$MYLOG
cat $MYLOG |mailx -s "Log for scp exclude_lists" t314djb
cat $MYTEMP/exclude_list |mailx -s "Master exclude_list to be pushed out"
t314djb
This script only takes about 2 minutes to run. Once this finishes, still
have to run script in root's crontab to copy this from my $HOME/nb to
/usr/openv/netbackup/
directory. This is just a basic copy, but set to run 6 minutes after master
script runs:
#!/usr/bin/ksh
/usr/bin/cp /export/home/t314djb/nb/exclude_list /usr/openv/netbackup
then, most important, at 2229 (10:29pm) I run a compare to make sure that
the NB exclude list. This compares the times, NB file should have newer
timestamp because the exclude_list file sitting in my homedir/nb had been
there for a few minutes:
#!/usr/bin/ksh
file1=/export/home/t314djb/bin/temp/exclude_list
file2=/usr/openv/netbackup/exclude_list
mylog=/export/home/t314djb/bin/temp/compare.log
echo "" >$mylog
/usr/bin/date >> $mylog
if [ $file2 -nt $file1 ]
then
echo "NetBackup exclude_list is current" >>$mylog
else
echo "Script isn't working!!!" >>$mylog
fi
cat $mylog|mailx -s "Status of exclude list script on frey" t314djb
This is probably more complicated that what most environments have to put up
with, but this does work and works really well. Let me know if you have any
comments or suggestions. I'll attach everything also.
Also, here is what root's and my cron looks like for these scripts to run:
mine:
22 22 * * 0-5 /export/home/t314djb/scripts/get_exc_list.ksh > /dev/null 2>&1
30 22 * * 0-5 /export/home/t314djb/scripts/comp.ksh > /dev/null 2>&1
root:
19 22 * * 0-5 /usr/local/scripts/excludelist.ksh > /dev/null 2>&1
25 22 * * 0-5 /usr/local/scripts/exclude_cp.ksh > /dev/null 2>&1
Attachments
-comp.ksh-final compare of $HOME/nb/exclude_list and $NB/exclude_list, runs
last(4th) in my cron
-exclude_cp.ksh-runs 3rd, copies new master exclude list from my nb to $NB
-exclude_list.ksh-runs 1st, generates local exclude list on each server
based on what Oracle instance is still up, runs in root's cron
-get_exclude_list.ksh-runs 2nd, does all the work of getting list off of
each client, putting into one file, sorting, renaming, and pushing back out
to my $HOME/nb
reason this has to be done this way is each oracle instance reside across
all 5 servers, so if a backup of one instance on one server fails, it fails
across all 5. So, the exclude_list must be the same on each 5 servers.
**One thing to remember, when running get_exclude_list, be sure and check
exclude_list.* in your homedir, or where every you designate you temp
directory to be. If there is even a space/added blank line in one of these
files, it will be the quickest backup you ever saw. I echo's a line by
mistake in the beginning phases of writing this, many months ago, and it put
ALL the instances in the exclude list, which mean NOTHING go backed up. It's
funny looking back now, but not at the time. That's why I wrote that script
separate, as far as functionality It can be run at any time, as many times
as you want, and does not affect anything. It will not hurt anything or
mess up the backups. Everything is in your home directory locally, and on
each server. Hope this helps!
ps-i gzipped all 4 files because I received notice that this email was too
long. I hope this one makes it through.
------_=_NextPart_001_01C3E482.6ADD3830
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>NOPHI Command Line control of Client Exclusion lists?</TITLE>
<META content="MSHTML 6.00.2800.1276" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
Brzozowski, Dwayne <BR><B>Sent:</B> Monday, January 26, 2004 8:31
PM<BR><B>To:</B> 'Hart, Charles'<BR><B>Subject:</B> RE: [Veritas-bu] NOPHI
Command Line control of Client Exclusion lists?<BR><BR></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>Ok,
here they are First of all, I'll explain what I am doing, hosts
involved, etc. before I start posting scripts. I have a customer with an
E10K , all Solaris 8, with 5 domains, with Oracle running on each. Some
instances are up each night, and some are down. I only want to back up those
instances that are down and exclude those instances that are up. On each
server, I have a script that checks for instances of smon that are up and
puts
that into an exclude_list, in netbackup directory, on each server. I chose
one
of those servers as my "home base" for everything, master scp scripts, log
files, munging log files, and pushing new master list out. . From this
server,
I created a RSA (ssh-keygen -t rsa), dsa won't work, key with
ssh, with no password, and put that key in my authorized_keys
($HOME/.ssh/authorized_keys) file on all 5 servers. For this
script
to work, no passwords can be used when generating this key. Since ssh is
being used under my identity, it still adheres to federal security
guidelines, so this does work. To ensure this works, once the key is
generated/copied, from the home server, ssh to each box, you should not
be prompted for a password. These scripts run very quick, which they must as
I
have only 19 minutes for everything to run, start to finish.
</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-First script, runs locally on each of the 5-Solaris clients running
Oracle. It took a while to time this to see when the actual Oracle databases
are shut down. Those scripts are controlled by the dba's so this had to be
timed to run when those are shutdown, but with time to complete the rest of
the scripting before the backups actually begin, which is 15 minutes later,
2230( 10:30pm) This runs at 2016(10:16pm) when databases are shut down to
check for up instances:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>I
will also attach each script at the end. </FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>this
is first exclude_list.ksh-run in root's cron</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>#!/usr/bin/ksh<BR>/usr/bin/ps -ef | grep ora_smon | grep -v grep |
\<BR>/usr/bin/nawk '{print $1}' | \<BR>/usr/bin/nawk -F 'ora' '{print
"/U0*/"$2"/"}' > /usr/openv/netbackup/exclude_list<BR>#to add the
secondary
copy area to the exclude list-added by t314djb<BR>#on
3/10/2003<BR>#/usr/bin/echo "/U07/stage/"
>>/usr/openv/netbackup/exclude_list<BR>#/usr/bin/echo
"/U05/stage/"
>>/usr/openv/netbackup/exclude_list<BR>/usr/bin/echo
"/tmp/" >>/usr/openv/netbackup/exclude_list<BR>/usr/bin/echo
"/proc/" >>/usr/openv/netbackup/exclude_list<BR>/usr/bin/echo
"/dev/fd/" >>/usr/openv/netbackup/exclude_list<BR>/usr/bin/echo
"/etc/mnttab/"
>>/usr/openv/netbackup/exclude_list</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>this
is the get_exclude_list.ksh scripts-I call the Master script that
runs in
my crontab. Frey, which is my home base for these scripts is where
this resides. This script does the following:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-pulls the exclude_list, via scp, from each server</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-takes those 5 files, all with new name of exclude_list.$host,
</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-put
all data into one file</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-remove duplicate lines from new file, push that file into $HOME on
other clients</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>Here's the master exclude_list script:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>ps-you'll see a lot of duplicate lines. This script echo's to a log
and
to screen because I sometimes have to run this manually for emergency backups
and it saves time to see exactly what's happening. </FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>#!/usr/bin/ksh</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>#Written by Dwayne J. Brzozowski<BR># in June, 2003<BR>#to address
exclude_list problem<BR>#</FONT></SPAN><BR>#cleaning out exclude_lists before
beginning<BR>hosts=`cat
/export/home/t314djb/scripts/corefls_hosts`
#list of whatever hosts you want this list pushed out to, one host per
line<BR>scp=/usr/local/bin/scp<BR>MYTEMP=/export/home/t314djb/bin/temp<BR>MYLOG=/export/home/t314djb/bin/temp/exclude.log<BR>MYBAK=/export/home/t314djb/bin/temp/BAK<BR>DATESTAMP=`/usr/bin/date
+"%y%m%d"`<BR>/usr/bin/mv /export/home/t314djb/bin/temp/exclude_list*
$MYBAK<BR>/usr/bin/touch /export/home/t314djb/bin/temp/exclude_list<BR>echo
""
>$MYLOG<BR>/usr/bin/date
>>$MYLOG<BR>echo " Getting exclude_list from frey, frigg,skadi,odin,and
loki....."<BR>echo " Getting exclude_list from frey, frigg,skadi,odin,and
loki....." >> $MYLOG<BR>for host in $hosts
;<BR>
do<BR>
echo
""<BR>
echo " $host...
"<BR>
echo " $host... "
>>$MYLOG<BR>
echo
""<BR>
echo ""
>>$MYLOG<BR>
$scp $host:/usr/openv/netbackup/exclude_list
$MYTEMP/exclude_list.$host<BR>
echo copied
$host<BR>
echo copied $host
>>$MYLOG<BR>
echo ""<BR> done</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>echo
""<BR>echo "" >>$MYLOG<BR>echo " Putting all lists into one
file....."<BR>echo " Putting all lists into one file....."
>>$MYLOG<BR>for host in $hosts
;<BR>
do<BR>
echo
""<BR>
echo " $host...
"<BR>
echo " $host... "
>>$MYLOG<BR>
echo
""<BR>
echo "" >>$MYLOG</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>
cat $MYTEMP/exclude_list.$host >>
$MYTEMP/exclude_list.allhosts<BR>
cat $MYTEMP/exclude_list.allhosts |sort -u
>$MYTEMP/exclude_list<BR>
done</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>echo
""<BR>echo "" >>$MYLOG<BR>echo "Now scp'ing new exclude_list to my
$HOME/nb on frey,frigg,skadi,odin, and loki"<BR>echo "Now scp'ing new
exclude_list to my $HOME/nb on frey,frigg,skadi,odin and loki"
>>$MYLOG<BR>for host in $hosts
;<BR>
do<BR>
echo
""<BR>
echo " $host...
"<BR>
echo " $host... "
>>$MYLOG<BR>
echo
""<BR>
$scp $MYTEMP/exclude_list
$host:/export/home/t314djb/nb<BR>
done<BR>echo "New root cronjob will cp exclude_list to /usr/openv/netbackup
on
each box"<BR>echo "New root cronjob will cp exclude_list to
/usr/openv/netbackup on each box" >>$MYLOG</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2><BR>echo "" >>$MYLOG<BR>echo "2nd script local to each host will
cp list to NB dir in a few" >>$MYLOG<BR>echo "This cp script will
also compare file in this dir" >>$MYLOG<BR>echo "with NB exclude_list
datestamp...." >>$MYLOG<BR>cat $MYLOG |mailx -s "Log for scp
exclude_lists" t314djb<BR>cat $MYTEMP/exclude_list |mailx -s "Master
exclude_list to be pushed out" t314djb</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>This
script only takes about 2 minutes to run. Once this finishes, still have to
run script in root's crontab to copy this from my $HOME/nb to
/usr/openv/netbackup/</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>directory. This is just a basic copy, but set to run 6 minutes
after master script runs:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>#!/usr/bin/ksh<BR>/usr/bin/cp /export/home/t314djb/nb/exclude_list
/usr/openv/netbackup</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>then, most important, at 2229 (10:29pm) I run a compare to make sure
that the NB exclude list. This compares the times, NB file should have newer
timestamp because the exclude_list file sitting in my homedir/nb had been
there for a few minutes:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>#!/usr/bin/ksh<BR>file1=/export/home/t314djb/bin/temp/exclude_list<BR>file2=/usr/openv/netbackup/exclude_list<BR>mylog=/export/home/t314djb/bin/temp/compare.log<BR>echo
""
>$mylog<BR>/usr/bin/date >> $mylog<BR>if [ $file2 -nt
$file1 ]<BR>then<BR> echo "NetBackup exclude_list is current"
>>$mylog<BR>else<BR> echo "Script isn't working!!!"
>>$mylog<BR>fi<BR>cat $mylog|mailx -s "Status of exclude list script on
frey" t314djb</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>This
is probably more complicated that what most environments have to put up with,
but this does work and works really well. Let me know if you have any
comments
or suggestions. I'll attach everything also. </FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>Also, here is what root's and my cron looks like for these scripts to
run:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>mine:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>22
22 * * 0-5 /export/home/t314djb/scripts/get_exc_list.ksh > /dev/null
2>&1</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>30
22 * * 0-5 /export/home/t314djb/scripts/comp.ksh > /dev/null
2>&1</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>root:</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>19
22 * * 0-5 /usr/local/scripts/excludelist.ksh > /dev/null
2>&1</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff size=2>25
22 * * 0-5 /usr/local/scripts/exclude_cp.ksh > /dev/null
2>&1</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>Attachments</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-comp.ksh-final compare of $HOME/nb/exclude_list and $NB/exclude_list,
runs last(4th) in my cron</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-exclude_cp.ksh-runs 3rd, copies new master exclude list from my nb to
$NB</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-exclude_list.ksh-runs 1st, generates local exclude list on each
server
based on what Oracle instance is still up, runs in root's
cron</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>-get_exclude_list.ksh-runs 2nd, does all the work of getting list off
of each client, putting into one file, sorting, renaming, and pushing back
out
to my $HOME/nb</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>reason this has to be done this way is each oracle instance reside
across all 5 servers, so if a backup of one instance on one server fails, it
fails across all 5. So, the exclude_list must be the same on each 5 servers.
</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2>**One thing to remember, when running get_exclude_list, be sure and
check exclude_list.* in your homedir, or where every you designate you temp
directory to be. If there is even a space/added blank line in one of these
files, it will be the quickest backup you ever saw. I echo's a line by
mistake in the beginning phases of writing this, many months ago, and it put
ALL the instances in the exclude list, which mean NOTHING go backed up. It's
funny looking back now, but not at the time. That's why I wrote that script
separate, as far as functionality It can be run at any time, as many times
as you want, and does not affect anything. It will not hurt
anything or mess up the backups. Everything is in your home directory
locally,
and on each server. Hope this helps!</FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2><SPAN class=850490003-27012004>ps-i gzipped all 4 files because I
received notice that this email was too long. I hope this one makes it
through.</SPAN></FONT></SPAN></DIV>
<DIV><SPAN class=874573700-27012004><FONT face=Arial color=#0000ff
size=2><SPAN class=850490003-27012004></SPAN></FONT></SPAN> </DIV>
<DIV><FONT face=Arial color=#0000ff
size=2></FONT> </DIV></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C3E482.6ADD3830--
------_=_NextPart_000_01C3E482.6ADD3830
Content-Type: application/octet-stream;
name="comp.ksh.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="comp.ksh.gz"
H4sICCnUFUACA2NvbXAua3NoAJWQP0/DMBDFZ/wpLkklpmIFWJsBCSZgYUQIOc6lMfGfyL5AK/Hh
cZ2kFBbEZvne7713V2R8DJ7XyvI+dKxVGssNx93gPPHOGeR0VV43b3WSEJohDqUeG3zVKlACLjfJ
ww1o37lFqoXsx186s9du+4exdGYQHi+ikhURiNx/qqDsHOQ5nFWrlMaOmzWCMH5XMA9UC8+wStVh
bWl6lvDCqEPLACanR6SbtAmcxoAKIEfv0VIO1RKFOuARfJJeDQehPSf4cL5XdptlWQ7f+lYxKWju
82mE0jtYh4iSoDGAa5dMSJlhcnQWWo/7HOZDsGIxiaITlwcRCD3czrXvDxaRvfvBfgGEt46x+gEA
AA==
------_=_NextPart_000_01C3E482.6ADD3830
Content-Type: application/octet-stream;
name="exclude_cp.ksh.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="exclude_cp.ksh.gz"
H4sICC/UFUACA2V4Y2x1ZGVfY3Aua3NoAFNW1C8tLtJPyszTzy7O4IJzkgsU9FMrCvKLSvQz8nNT
9UuMDU1SspL085KAwsk5pSmp8TmZxSUKYA35Bal5Zfp5qSVJicnZpQVcAGBi6nVVAAAA
------_=_NextPart_000_01C3E482.6ADD3830
Content-Type: application/octet-stream;
name="exclude_list.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="exclude_list.gz"
H4sICDTUFUACA2V4Y2x1ZGVfbGlzdADTDzXQ0k/LSS4z1OfSh7GN4OzMPAS7OB2mJjcl1QDETkkt
009LATJSS5L1c/NKShKTgJyCovxkIFWSW6DPBQCQvckkXwAAAA==
------_=_NextPart_000_01C3E482.6ADD3830
Content-Type: application/octet-stream;
name="get_exc_list.ksh.gz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="get_exc_list.ksh.gz"
H4sICDnUFUACA2dldF9leGNfbGlzdC5rc2gAzVbfT9swEH6O/4pbWjRpK4TBnjaBBAIxbRSQVmna
E3UStzFN7Mh2aIv443d2krZpwi+Jh/khjZzvvjvfd3du74/ixjAB4RLO5nQpGPzcg1P1IB/kXM84
6QEX8LMQbAAH+/uHpGck0DhWTGtgiygtYnabcm0gVzJMWUZ6pPchKLQKQi6CmU6A9KKUUcHFFGRh
GkYaQjaRiuHPlFsESSTuHo0jaiBgi1wqEyQyY4E5/PI1vgsDHSmeGx1EaDVJ9a3Dj4mO8iPnNJUR
TZ1r3CLDv6Pz4c1RJ5PFGJZZ0OX1xfOYoAp6L5VTxJ+e/HoBjwhydjI6/z06Qf/jVT5iahh89neW
O9lO7I/J6kN2D6+KwKXtE/RdEGtzI4soeQMD6a1MVQa7E8/rl7lqoPZomroEb8Cdp5fgLEok+L7n
HfdddkkzAcf1domDC2aMLY9GPU2UzPDBlgN88ul0oGc05gMZczGgIoZUzvieXf470WBYUMWFNQn2
JLb2++5I8B2IF0viedXZVm/glkMhCzz9YX3sNsnGR8DkYu2Wht9c4mTOxH0gmAlpNCuaSkKnEs64
Zo9kzllcEkLnZmdoscRhQGotSSvQ6pQ3RZl1FB/KnuYCZ4Q1nvCUVbl9G3rlo0sIAtVCOWBr1cF2
77ekeh1sQ5s3uWsobifa01JVtfdMSz3DUGPgUWP3w24Bx1241yp6JeeABfjRyiTYvNlOqFW2hP6P
6+F5IELUreytVmtB3Vv+O7KuSV+oEO//LY2ytzvkgbrju4a4CDeqXrA6p5hHJaWBSElxJ0OYc2wr
5N9ObtcUsVlmFG+NUC78dyfcLqrWxgFKWV7m4O5sy+qsnZi139rf1SnEXIEVmcKEzVt0o4Rra1BR
OnuaajvnspyqcrpYc2OByNVimHOTWD+No9rrShua5VtzqepFfIXHjPJ0Absa/Es5BVuPeitj2odK
SPJUE2/SDKk2TLVyHjLIC53g0Ma/UWvGf/lugfrCCQAA
------_=_NextPart_000_01C3E482.6ADD3830--
|