Whatever you put in script it WILL be executed unless commented out. If you wish to see more details of passed arguments, add set -vx. If you want to run NW commands emulating execution, most of the time there is -n switch for that (check manual). If you wish to see what you script would do instead of executing it, place echo before execution part.
This script was to adjust client retention from Infinite to 90 Day. Due to issues with our INDEX and Media DB I am going to purge them from NetWorker by manually deleting. I believe I can add something to after "nsrmm -d -S $y -y" like -No or something to test without actually doing. I have tested #'ing out the line and creating a log file to confirm the savesets but when deleting I do not believe you can ever be too careful.
bingo.1
2.4K Posts
0
October 24th, 2018 05:00
Please be more specific - a script for what purpose:
- running a job (backup, clone, recover) or
- reconfiguring NW resources or
- ????
ble1
4 Operator
•
14.4K Posts
0
October 24th, 2018 06:00
Whatever you put in script it WILL be executed unless commented out. If you wish to see more details of passed arguments, add set -vx. If you want to run NW commands emulating execution, most of the time there is -n switch for that (check manual). If you wish to see what you script would do instead of executing it, place echo before execution part.
indybuadmin
3 Posts
0
October 24th, 2018 07:00
An example
This script was to adjust client retention from Infinite to 90 Day. Due to issues with our INDEX and Media DB I am going to purge them from NetWorker by manually deleting. I believe I can add something to after "nsrmm -d -S $y -y" like -No or something to test without actually doing. I have tested #'ing out the line and creating a log file to confirm the savesets but when deleting I do not believe you can ever be too careful.
mminfo -avot -q "client=$1,savetime<04/1/18" -r ssid |\
while read y
do
echo $y
echo $1
#nsavetm=`mminfo -q ssid=$y -r nsavetime`
#updateretent=`expr $nsavetm + 7973989`
#echo "$updateretent"
#nsrmm -y -e "$updateretent" -S "$y"
nsrmm -d -S $y -y
sleep 2
done