Unsolved
3 Posts
0
800
Networker Script Do not Apply
Hello,
Hopefully this is an easy one. It has been awhile since I wrote new scripts for NetWorker and for some reason I can not think of the switch that will run the script and not apply the changes.
Patrick
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
2 Intern
2 Intern
•
14.3K 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