I was trying to parse the notification with batch/script file but was not able to do so. The reason to do this was to capture something informative from the original notification and put it to the header of the notification instead of receiving all notifications with the same subject. On a unix backup server, I know this can be done. On a windows backup server, I am not able to find the right way to do it. Wondering if anyone know how to do it? I am trying to capture the output to a temporary file and do the parsing. EMC support said this is not supported and so I couldn't get any help from them.
I presume you are looking for information from the NetWorker backups. If you can provide me with a specific example of what you are looking for, I may be able to help you.
If you have a script / batch written for UNIX, provide that as well so I can see what you are trying to do.
The NetWorker commands used in UNIX are pretty much the same as they are in Windows, with a few tweaks. If I know what you are working with, then I can probably pull it together for you.
What I am looking for is how to capture the notification that networker generate on a savegroup completion, pass it to a variable/argument of a batch file, then from there to do the parsing.
For example in UNIX, on the notification, for savegroup completion, I can indicate a path to a script ie /admin/script/savegroup_completion
In the script for savegroup_completion, I would be able to pass the notification to do a 'cat $* > $tmpfile'.
From there I can do the parsing .
I am looking for a windows equivalent to the $*, i tried %1, %* in a test.bat file but could not get anything.
I tried also in vbscript to use 'InputString = Stdin.ReadLine', but had no success as well.
Hope I am able to explain clearly as I am still learning how to script.
Thanks TimQuan, I am not really looking for the scripting part.
Yes you are As you have said, this can be done under UNIX and the way it is done is via scripts. Most likely, you would use PowerShell or Perl on Windows box to do that.
I'm not familiar with positional parameter on Windows when it comes to $* or $@, but what about following... Place script name to notification action and make first line of the script to be nsrlog -f . From there you can parse group name which you can further... for example I just did a test to see if nsrlog would would and then I manually parsed group name from powershell:
Obviously this is not ideal as you need to call PS from your script (meaning you need to install it unless you have 2008) and there might be overlap of some kind if 2 groups fail at the same time. Anyway, with group name you could use cmd line to send via blat for example report with group name in subject and attach file created by nsrlog (or just use it as mail content). And of course delete the file.
Obviously on UNIX this can be one-liner, but on Windows is more painful. I have no clue about Windows scripts, but I believe this is possible... invest your time in idea above and see if that will result in anything usable.
TimQuan
6 Operator
•
1242 Posts
403
0
Posted September 25th, 2011 19:00
Hi,
You may need to write a script to do so. You can contact Microsoft for help.
You can ask for help in the Microsoft Scripting forum. They mainly deal with scripting issues.
http://social.technet.microsoft.com/Forums/en-US/ITCG/threads
Regards,
Tim