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!

Savepnpc

Status
Not open for further replies.

ofladung

Technical User
Mar 21, 2005
64
DE
Hi All,

I tried to use savepnpc the first time, but it doesn’t work. Obviously I did not set it up correctly, but I don’t know why ;-).
What I want to do is:

Run a post command after a backup which deletes an older version of a file (my colleague creates database dumps)

I tried the following to test it:

1 client in a test group, backup command is savepnpc
I Changed the group res file on the client after a first small backup:

type: savepnpc;
precmd: "echo hello";
pstcmd: "c:\\Program Files (x86)\\Legato\\nsr\\res\\LegatoPostCMD.cmd";
timeout: "12:00:00";
abort precmd with group: No;

The cmd file contains (for testing):

ren C:\Program Files (x86)\Legato\nsr\res\Test.txt Test2.txt
exit

The savepnpc.log shows

3/19/2008 12:36:02 PM preclntsave: All command(s) ran successfully.
3/19/2008 12:37:02 PM pstclntsave: All savesets on the worklist are done.
3/19/2008 12:37:03 PM pstclntsave: Not all command(s) ran successfully.
3/19/2008 12:37:03 PM pstclntsave: Exited.

I’m sure the reason is obvious, but not for me and not today ;o)

Oliver
 
I think its a windows issue.
Try :
The cmd file contains (for testing):

ren "C:\Program Files (x86)\Legato\nsr\res\Test.txt" Test2.txt
exit

There a two traps:
First there are blanks in the path of the file so you have to quote, second the destination directory is not specified.
 
Ok - I changed the cmd file:

ren "C:\Program Files (x86)\Legato\nsr\res\Test.txt" "C:\Program Files (x86)\Legato\nsr\res\Test2.txt" (without line breaks)
exit

The result is the same

3/19/2008 1:33:29 PM pstclntsave: Not all command(s) ran successfully.
 
Are you sure you have to double-backslash in a .res file on Windows?
 
Yes:

type: savepnpc;
precmd: "echo hello";
pstcmd: "c:\\Program Files (x86)\\Legato\\nsr\\res\\LegatoPostCMD.cmd";
timeout: "12:00:00";
abort precmd with group: No;

The client runs on a Windows Server 2003 x64
 
Again its Windows :
ren is no "real" command but intrinsic to cmd.exe
The syntax is cmd.exe/c ren ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top