[Veritas-bu] Is there any command to deactive all jobs...
2004-08-05 12:28:41
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"
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Veritas-bu] Is there any command to deactive all jobs..., (continued)
- [Veritas-bu] Is there any command to deactive all jobs..., Kendall, Scott APX
- [Veritas-bu] Is there any command to deactive all jobs..., BeDour, Wayne
- [Veritas-bu] Is there any command to deactive all jobs..., Lee, Kenneth
- [Veritas-bu] Is there any command to deactive all jobs..., Kendall, Scott APX
- [Veritas-bu] Is there any command to deactive all jobs..., Kendall, Scott APX
- [Veritas-bu] Is there any command to deactive all jobs...,
Mark.Donaldson AT cexp DOT com <=
- [Veritas-bu] Is there any command to deactive all jobs..., ChrisCosta AT tdwaterhouse DOT com
- [Veritas-bu] Is there any command to deactive all jobs..., Kendall, Scott APX
|
|
|