Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Organization of log files

Status
Not open for further replies.
Aug 22, 2002
113
FR
Hello,


Our Windows 2000 NetWorker server outputs every savegroup completion event to the same log file. We would like it to output this events to a corresponding directory with the savegroup name and containing the date and time of the savegroup completing on the file name. Doing this in Unix scripting is a snap but does anyone know how to do it in Windows 2000?

P.S.: We want to do the same thing with the bootstrap files.


Thanks for your help.
 
You can use the "Owner notification" field (Client/preferences)
and the command
nsrlog -f D:\Logs\<clientname>.log
 
Hello,


That's not exactly what I'm looking for. Here's our Unix script that is run after each savegroup completion in our Solaris NetWorker server and that I want to reproduce on Windows 2000:

#!/bin/sh

STOCKDIR=/nsr/Utilitaires/reports/savegrp
RDISTFDIR=/nsr/Utilitaires/bin
DATEJOUR=&quot;`date +%d%m%y`&quot;
DATEJOUR_S=&quot;`date +%y%m%d`&quot;
SAVEGROUP=&quot;&quot;

/usr/bin/cat >> $STOCKDIR/tous/rapport.$DATEJOUR
sleep 2

RECHERCHE=&quot; $MOTCLE completed&quot;
RECH_SKIP=&quot;level=skip&quot;
RECH_INDX=&quot;index:&quot;
SAVEGROUP=&quot;`/usr/bin/grep &quot;$RECHERCHE&quot; $STOCKDIR/tous/rapport.$DATEJOUR`&quot;
SKIP=&quot;`/usr/bin/grep &quot;$RECH_SKIP&quot; $STOCKDIR/tous/rapport.$DATEJOUR | /usr/bin/grep &quot;$RECH_INDX&quot;`&quot;

if [ &quot;${SAVEGROUP}&quot; != &quot;&quot; ]
then
if [ &quot;${SKIP}&quot; = &quot;&quot; ]
then
HEURE=&quot;`date +%H_%M`&quot;

/usr/bin/mv $STOCKDIR/tous/rapport.$DATEJOUR $STOCKDIR/$MOTCLE/rapport.${DATEJOUR}_${HEURE}

exit
else
/usr/bin/rm $STOCKDIR/tous/rapport.$DATEJOUR
exit
fi
fi
done

Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top