Veritas-bu

[Veritas-bu] Is there any command to deactive all jobs...

2004-08-05 13:08:02
Subject: [Veritas-bu] Is there any command to deactive all jobs...
From: ChrisCosta AT tdwaterhouse DOT com (ChrisCosta AT tdwaterhouse DOT com)
Date: Thu, 5 Aug 2004 13:08:02 -0400
Have you considered using the bprdreq -terminate command to kill the bprd
and stop the bpsched from "awakening". 

Once the work or upgrade is completed use the bprdreq -alive command to
restart the bprd and the bpsched command.

Chris

-----Original Message-----
From: Mark.Donaldson AT cexp DOT com [mailto:Mark.Donaldson AT cexp DOT com] 
Sent: Thursday, August 05, 2004 12:29 PM
To: veritas-bu AT mailman.eng.auburn DOT edu
Subject: RE: [Veritas-bu] Is there any command to deactive all jobs...

OK - here's a ksh script pair that'll record the state of the policies &
disable the active ones.  The other script will read the file where the
previous values are stored & reenable the formerly enabled ones...

$ cat policy_disable_all

#!/bin/ksh

export PATH=$PATH:/usr/openv/netbackup/bin/admincmd

STORE=/var/tmp/policy_state_DO_NOT_DELETE

if [ -f $STORE ]
then
  echo "## WARNING:"
  echo "## stored policy values found."
  echo "## Delete \"$STORE\" if you"
  echo "## intend to run this script again before"
  echo "## running the re-enabling script."
else
  echo "## Recording current policy states."
  for pl in `bppllist`
  do
    bppllist $pl -U | awk '$1=="Active:" {print "'$pl'",$2}'
  done > $STORE

  echo "## Disabling policies"
  for pl in `awk '$2=="yes" {print $1}' $STORE`
  do
    echo "## Disabling $pl"
    bpplinfo $pl -modify -inactive
  done
fi
echo "## Done"
exit

$ cat policy_reenable_all

#!/bin/ksh

export PATH=$PATH:/usr/openv/netbackup/bin/admincmd

STORE=/var/tmp/policy_state_DO_NOT_DELETE

if [ ! -f $STORE ]
then
  echo "WARNING: past state file not found. \"$STORE\""
else
  echo "## Enabling policies"
  for pl in `awk '$2=="yes" {print $1}' $STORE`
  do
    echo "## Enabling $pl"
    bpplinfo $pl -modify -active
  done
fi
[ -f $STORE ] && rm -f $STORE && echo "## Deleted: $STORE"
echo "## Done"
_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu