I am having a hard time *consistently* extracting the save set name out of the "--- Unsuccessful Save Sets ---" lines in the “savegroup logs”.
There doesn’t seem to be a strong consistency in the formatting of this log. Although every line in the "--- Unsuccessful Save Sets ---" seems to start (optionally) with a "*" (not sure what it means), then the client name, then a colon, and then the save set name, I am not always able to consistently determine where the name of the save set ends, and where the actual message begins, especially when the save set name contains space characters.
Here are example of lines from some "--- Unsuccessful Save Sets ---" sections:
* abcdlm:MSEXCH:IS 46757:nsrxchsv:Processing storage group "My Storage Group"
Here, I would need to extract: MSEXCH:IS
* 0b1axzp01:VSS SYSTEM SERVICES:\ Termination request was sent to job 948375 as requested; Reason given: Aborted
Here, I would need to extract: VSS SYSTEM SERVICES:\
* 23afg6o8:C:\ File C:\Documents and Settings\Administrator\Local Settings\Application Data\Microsoft\Windows\UsrClass.dat could not be opened and was not backed up. (The process cannot access the file because it is being used by another process).
Here, I would need to extract: C:\
* 23afg6o8:C:\BDrive\cdrive (ksdcsrv3) (K) - Shortcut (2).lnk Unable to find any full backups of the save set '23afg6o8:C:\BDrive\cdrive (ksdcsrv3) (K) - Shortcut (2).lnk' in the media database. Performing a full backup
Here, I would need to extract: C:\BDrive\cdrive (ksdcsrv3) (K) - Shortcut (2).lnk
* 23afg6o8:C:\BDrive\Project Larry Data Tigr Unable to find any full backups of the save set '23afg6o8:C:\BDrive\Project Larry Data Tigr' in the media database. Performing a full backup.
Here, I would need to extract: C:\BDrive\Project Larry Data Tigr
* 0b1axzp02:/ 5767:save: NSR server ddsvrp01: Remote system error - Connection timed out
Here, I would need to extract: /
* 23afg6o8:C:\BDrive\Local Redeve\AB Forecasts 99123:save: Handling an abort while processing Windows backup.
Here, I would need to extract: C:\BDrive\Local Redeve\AB Forecasts
And this is only a handful of examples. The variety of formats for those lines across savegroups for a NetWorker server, and even across NetWorker servers makes it almost impossible to implement a robust parser to extract data out of those lines. I really need to be able to extract the save set name and I can’t seem to rely on particular markers in the line to find where the save set name might end.
Is there a better way in NetWorker 8 (I know that we don’t really have savegroups, and certainly no savegroup logs in NetWorker 9 – I need 😎 to get the information provided by the savegroup log (especially the unsuccessful save sets) but with a more consistent format that is more easily parsable?
Or maybe there is a way to get the definitive list of save sets for each client of a NetWorker server, from which I could build a master list that I can refer to whiletrying to parse the “unsuccessful” lines?
Thanks in advance,
In fact this is not easy. My suggestions:
1. Render the daemon.raw file for a day
2. Filter the output for lines containing specific strings that indicating a certain error.
3. Then investigate the output and
4. Restart the appropriate group (for a specific client)
Use a professional tool like "backup eagle" which should also support NW 9 by now.
I prefer to have custom notification in place which gets to my email saying which client failed or which group was already running if that happens. Saveset - I care less as follow up action is always to restart the group anyway. However, since with custom notification you can easily catch clientname and groupname, you can always feed one (or both) to nsrsgrpcomp to get info from jobdb including summary what went wrong (kind of savegrp log). Different clients and modules (and savesets) report back differently and there is perfect logic behind that. Parsing is possible, but it requires you not to do vanilla parsing but rather more elaborate parsing with cases and conditions.
NetWorker 8.x has the command nsrsgrpcomp. The output from this looks like it might have better formatting that you can use. The Command Reference Guide describes it as:
The nsrsgrpcomp command is a command-line based program used to query the NetWorker server’s jobs database and the savegrp log files in order to display a savegrp completion report. The jobs database is maintained by the nsrjobd (1m) daemon and can alternatively be queried using the jobquery (1m) command. The savegrp log files are located on the NetWorker server machine in /nsr/logs/sg/<group_name> directory.
From: How to use the nsrsgrpcomp command in NetWorker to query savegroup completion data, https://support.emc.com/kb/329887
230-stuff is the name of the backup group which I would like to query.
nsrsgrpcomp -H 230-stuff
vm-lego-230-backup, savefs, "succeeded:full:savefs"
vm-lego-230-backup, /etc/hosts, "failed:full:save"
vm-lego-230-backup, /etc/yp.conf, "failed:full:save"
vm-lego-230-backup, /etc/yum.conf, "failed:full:save"
vm-lego-230-backup, /etc/zlogin, "failed:full:save"
vm-lego-230-backup, /etc/zlogout, "failed:full:save"
vm-lego-230-backup, /etc/zshrc, "failed:full:save"
vm-lego-230-backup, index, "failed:full:index"
NetWorker 8.2 SP1 Command Reference Guide
Thanks all for your help. It looks like my only hope would be that nsrsgrpcomp's output behaves a little better than the group logs. From the documentation, the format seems to be the same and I still not might be able to detect the end of the save set name in each line but I will give it a try.