Networker

Re: [Networker] precmd Configuration Question

2009-02-11 15:53:29
Subject: Re: [Networker] precmd Configuration Question
From: Len Philpot <Len.Philpot AT CLECO DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Wed, 11 Feb 2009 14:40:38 -0600
> I am trying to get a better understanding on how to invoke commands on
> clients during backups. From reading the posts here it sounds like I 
> need to creat a file on the client in C:\Program Files\Legato\nsr\res 
> and name the file after the group that the client belongs to.
> Example: servergroup.res
> 
> And within that file I enter the pre & post commands. In this example 
> I just want to know that it worked by echoing a response.
> 
> type: savepnpc; 
> precmd: "cmd.exe /c echo Start >> c:\temp\start.txt"; 
> pstcmd: "cmd.exe /c echo Done >> c:\temp\stop.txt"; 
> timeout: "11:45:00"; 
> 
> After many attempts and interations  of the .res file, I still cannot 
> get file to output during a backup. Am I doing something wrong? Do I 
> need to make any modifications to the client entry on the server.

That looks OK, but keep in mind that the environment available to pre/post 
commands is virtually nil, so it's best to specify full paths, etc. Also, 
in the client definition, "Backup command" must be set to "savepnpc" (or 
"savepc" if you want the scripts to run for *each* saveset) for the *.res 
file to even be consulted. That's the case on unix, but I suspect Windows 
is the same, unless you need to specify "savepnpc.exe", etc.

To sign off this list, send email to listserv AT listserv.temple DOT edu and 
type "signoff networker" in the body of the email. Please write to 
networker-request AT listserv.temple DOT edu if you have any problems with this 
list. You can access the archives at 
http://listserv.temple.edu/archives/networker.html or
via RSS at http://listserv.temple.edu/cgi-bin/wa?RSS&L=NETWORKER