nv-l
[Top] [All Lists]

RE: [nv-l] Netview Maint.

To: "'nv-l@lists.us.ibm.com'" <nv-l@lists.us.ibm.com>
Subject: RE: [nv-l] Netview Maint.
From: "Evans, Bill" <Bill.Evans@hq.doe.gov>
Date: Wed, 29 Dec 2004 09:19:28 -0500
Delivery-date: Wed, 29 Dec 2004 14:20:17 +0000
Envelope-to: nv-l-archive@lists.skills-1st.co.uk
Reply-to: nv-l@lists.us.ibm.com
Sender: owner-nv-l@lists.us.ibm.com

Here's what I do. I wrote a version which also transfers the backups to another NetView system and synchronizes the two using traps.  This is an outgrowth of the class exercises used when we taught "NetView for Unix for Administrators".  The addition of /usr/OV/www/conf/* covers the new Web Client configuration which didn't exist then.  Some low activity databases and the SNMP data collections are not backed up. 

#!/bin/ksh
#  This process does the recommended weekly backup of the configuration and
#  databases of a NetView server followed by the compresson and transmission
#  of those files to a backup server.  
#
#  Execute this script with the following invocation:
#      WVE-nvmaint.sh 
#

date_qual=`date | awk '{print $2 $3 }'`    # Derive a unique date qualifier
echo "/usr/OV/bin/WVE_nvmaint starting." | tee /usr/OV/log/WVE_nvmaint.log

# Create a file to use as a lockout; if this file is present CRON process
# skip their processing. 
echo `date` >/opt/webmon/netview.maint 

# do some periodic maintenance on the databases so we save clean ones
echo "Stopping the netmon daemon and cleaning up the topology and map databases."
/usr/OV/bin/ovstop netmon                                    # stop the  network daemon
/usr/OV/bin/ovtopofix -A | tee -a /usr/OV/log/WVE_nvmaint.log   # clean up the topology DB
/usr/OV/bin/ovmapcount -a  | tee -a /usr/OV/log/WVE_nvmaint.log # clean up the map DB

# Copy the content of the configuration and databases into a unique file
echo "Using TAR to copy /usr/OV/conf and /usr/OV/databases/openview to a backup directory."
/usr/OV/bin/ovstop ovtopmd
/bin/tar -cvf /usr/OV/backups/${date_qual}_conf.tar /usr/OV/conf/*  /usr/OV/www/conf/* | tee -a /usr/OV/log/WVE_nvmaint.log 

/bin/tar -cvf /usr/OV/backups/${date_qual}_ovdb.tar /usr/OV/databases/openview/* | tee -a /usr/OV/log/WVE_nvmaint.log

echo "Restarting daemons"
/usr/OV/bin/ovstart -v                             # restart the daemons

# Compress the files so they take up less space.
echo "Compressing the backup files."
/bin/compress /usr/OV/backups/${date_qual}_conf.tar
/bin/compress /usr/OV/backups/${date_qual}_ovdb.tar

# Check for trapd.log overflow and process the archive
if [ -w /usr/OV/log/trapd.log.old ]
   then
      echo "Renaming and Compressing a rollover archive of trapd.conf."
      /bin/mv /usr/OV/log/trapd.log.old /usr/OV/log/trapd.log.${date_qual}
      /bin/compress /usr/OV/log/trapd.log.${date_qual}
fi

# Display the available storage and prompt the user to verify there is enough.
   echo "Verify we are not running the system space too low with backups."
   /bin/df -k | tee -a /usr/OV/log/WVE_nvmaint.log

  rm /opt/webmon/netview.maint
  echo "/usr/OV/bin/WVE_nvmaint complete."  

Bill Evans
Tivoli NetView Support for DOE
301-903-0057

-----Original Message-----
From: owner-nv-l@lists.us.ibm.com [mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of Catalina Martinez
Sent: Wednesday, December 29, 2004 8:14 AM
To: nv-l@lists.us.ibm.com
Subject: [nv-l] Netview Maint.

Hello List...

I believe I've posted this before but can not find the answer in the
archives..

I need to figure a way to automate database maint. Does anyone have a
handy script?

I know ovtopofix is one command . What other commands are part of
regular maint.? Do you recommend daily, weekly or monthly? I guess it
depends on the size of the network?

Any suggestions (Netview 7.1.4 AIX 5.2)

Thanks
Catalina

<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web