ADSM-L

Re: BACKUP DB to disk - questions

2000-09-22 08:59:57
Subject: Re: BACKUP DB to disk - questions
From: Richard Sims <rbs AT BU DOT EDU>
Date: Fri, 22 Sep 2000 08:59:56 -0400
>Does TSM do anything about managing the database backup volumes?  Or do I
>need to do that manually? (ie delete old versions before it runs out of
>space).  As far as I can tell, the database doesn't see them as volumes,
>because they don't show up when I do Q VOL (although Q VOLHIST describes
>them as volumes.

It has historically been up to the TSM administrator to manage the db backup
versions. Query Volumes shows storage pool volumes, not other volume uses
such as dbbackup and export.

>When I have to restore the database at a later date, will I actually need
>the volumehistory file?

Yes, plus other files like dsmserv.dsk, so always make opsys-oriented backups
of those as well.  When you are doing a db recovery, you are in stand-alone
mode and can't look in the db, so the supplementary files are essential.
The recovery utilities expect and depend upon them.

>How likely is it that we'll need to restore the database anyhow - how often
>does a TSM database become corrupted, and under what circumstances?

The best cause of db mangling is in your computer, opsys, or TSM suddenly
going away, without graceful shutdown, with just a single image of your db.
Use TSM db mirroring, with MIRRORWrite Sequential to stay out of trouble.
Server programming errors also result in "interesting" situations, such as
tapes that won't empty, etc.  As another poster advised, always avoid early
releases of a new version of any product, to help allay problems.  Take all
due precautions: nobody wants to be in the hellish situation of having to do a
dsmserv auditdb.  In Unix systems that support it, create an /etc/rc.shutdown
that does a dsmadmc to perform a Halt, to shut TSM down nicely when the unix
system is shut down cleanly (which is not always the case, unfortunately).

   Richard Sims, BU


Sample rc.shutdown for ADSM (not TSM)...

#!/usr/bin/bsh
#
# /etc/rc.shutdown -- 'shutdown' command "user exit"
#
# Beginning with AIX v.4, the /usr/sbin/shutdown Ksh script will invoke
# /etc/rc.shutdown, under 'sh', if this file exists and is executable.
# /etc/rc.shutdown must complete with a return code of zero, otherwise
# the shutdown will be aborted.
# Do 'man shutdown' for further information.
#
# This rc.shutdown command is of particular use in shutting down subsystems
# such as ADSM, where an ungraceful shutdown could jeopardize database
# integrity, and the like.
#
# The permissions on this file should be: u=rwx,g=rw,o=
# thus allowing root to execute, administrators to read and revise,
# and keep others from seeing passwords and other sensitive information
# which would be contained in this rc.shutdown command.
#
# HISTORY:
#
#    1998/02/13  Created by Richard Sims.
#

hostname=`/usr/bin/hostname`;                                   # Get this 
host's name, in lower case.
HOSTNAME=`echo $hostname | /usr/bin/tr '[a-z]' '[A-Z]'`;        # Get this 
host's name, in upper case.

#______________________If this is an ADSM server system, perform an ADSM 
shutdown_________________________
# (Doing a clean shutdown of ADSM assures that database updating is complete.)
if [ -x /usr/bin/dsmc ] ;       # If ADSM CLI program exists, this is likely an 
ADSM client system...
   then
   #echo "This system ($HOSTNAME) is an ADSM client.";
   # ...so try an ADSM query to obtain the name of the ADSM server system.
   # In 'dsmc query options' output, the ADSM server will be identified on the 
line:
   #   Default SrvrName: 'HIYA'
   # (The leading blanks and enclosing quotes must be properly handled.)
   ADSM_SERVER=`/usr/bin/dsmc q o | /usr/bin/sed -n -e '/Default SrvrName/s/^[ 
]*Default SrvrName: .\([A-Z0-9-]*\).$/\1/p'`;
   echo "ADSM server system for this client system determined to be: 
'$ADSM_SERVER'";
   if [ $ADSM_SERVER = $HOSTNAME ] ;
      then
      #_____________________________This is the ADSM server 
system_________________________________
      echo "This system ($HOSTNAME) is an ADSM server.";
      /usr/lpp/adsm/bin/dsmadmc -id=______ -pass=______  halt
   else
      echo "This system ($HOSTNAME) is not an ADSM server.";
   fi
else
   echo "No ADSM client installed on this system, so can't be an ADSM server 
system."
fi

exit 0;         # Always exit 0, to assure 'shutdown' command continuing.
<Prev in Thread] Current Thread [Next in Thread>