Veritas-bu

[Veritas-bu] scratch_pool / Catalog Backup

2002-02-26 12:04:16
Subject: [Veritas-bu] scratch_pool / Catalog Backup
From: scott.kendall AT abbott DOT com (scott.kendall AT abbott DOT com)
Date: Tue, 26 Feb 2002 11:04:16 -0600
No, they stay in the pool they are in when they expire.

I use something like this to move them back to the scratch pool after they are
unassigned.  This is Korn on NT but should work on UNIX with little/no
changes.  *** test in your environment on your platform before using in
production ***.  It requires the environment variables for VERITAS_HOME,
NBU_MASTER and MM_VOLDB_HOST to be configured on the box for your environment.

- Scott


vmquery=$VERITAS_HOME/volmgr/bin/vmquery
vmchange=$VERITAS_HOME/volmgr/bin/vmchange

#  unique id used for temp files since locking is not used to allow only one
copy of this at once.
uid=$(basename $0 .ksh)_$(date +%m%d%y%H%M%S)

#  scratch pool number within media manager.
scratch_pool_number=4

#  add pools and volume groups that can be moved to the scratch pool if they
are unassigned.
#  some pools may require that they are not moved, such as the None pool.
#  separate each pool with a pipe and surround with quotes.
pools_OK_to_scratch="NetBackup|NetBackup_duplicates"
volgrp_OK_to_scratch="---"

#  moves unassigned volumes to scratch pool.
# vmquery can not be piped into while loop because vmchange will fail to
connect to vmd when vmquery is still running.
$vmquery -M $NBU_MASTER -h $MM_VOLDB_HOST -bx -a | tail +4
>$TEMP/$uid.vmquery.out
cat $TEMP/$uid.vmquery.out |
while read vmediaid vmediatype vrobottype vrobotnum vrobotslot vside vvol vop
vmnts vlmtdate vlmttime vasgndate vasgntime vpool; do
    if [[ $vpool = "@($pools_OK_to_scratch)" && $vvol = "
@($volgrp_OK_to_scratch)" && $vasgndate = "---" && $vasgntime = "---" ]]; then
        $vmchange -M $NBU_MASTER -h $MM_VOLDB_HOST -p $scratch_pool_number -m
$vmediaid
        if [[ $? -eq 0 ]]; then
            print moved $vmediaid from $vpool to scratch pool
        else
            print move of $vmediaid from $vpool to scratch pool FAILED
        fi
    fi
done




                                                                                
                                                   
                    Michael Suen                                                
                                                   
                    <suen AT cosmos.buffalo DOT edu>            To:     
veritas-bu AT mailman.eng.auburn DOT edu                                 
                    Sent by:                             cc:                    
                                                   
                    veritas-bu-admin AT mailman DOT eng.        Subject:     
[Veritas-bu] scratch_pool / Catalog Backup                   
                    auburn.edu                                                  
                                                   
                                                                                
                                                   
                                                                                
                                                   
                    02/26/2002 10:20 AM                                         
                                                   
                                                                                
                                                   
                                                                                
                                                   




Hello All

           I have a question about Scratch_pool, I know how to define
           a scratch_pool and assign all the blank tapes to it and
           NetBackup will assign different pools as they need tapes.
           Now, Does it do the "reverse", if the tapes are expired
           in the pool, would it go back to the scratch pool??

           Another question I have is about Catalog Backup, it looks
           like I can only do a Max of 2 Copies of the Catalog.
           Is there a way to verify the catalog backup is good, beside
           the return code 0 and use bprecover -l to list the heading?


           Thank you very much for everybody's help


                                          Mike

_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu





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