Hello everybody,
I am using savepnpc functionality to launch a script when you start a group.
Within the client you have /nsr/res/GroupName.res:
type: savepnpc;
precmd: "/etc/oracle/script1 \> /tmp/pre.out 2\>&1";
pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1"; ;
abort precmd with group: No;
The precmd section finishes without any error so Legato start to backup the savesets. The postcmd also executes with no conditions so I've had to do the following:
pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1";
findfailed.sh looks for a string err in the inner log of Legato to make a condition which can be used to launch or not script3. I am not interested in launching script3 because it deletes files, so if backup is not ok. (This necessary cause of Oracle DBA).
It works out really good on the Legato server, but if you try it in a client it doesn't. Client hasn't a /nsr/tmp/sec/g/GroupName...
Is there any way to test the result of a backup group in the client?
Could you give some piece of advice to solve it?
Manu thanks in advance,
Iago
I am using savepnpc functionality to launch a script when you start a group.
Within the client you have /nsr/res/GroupName.res:
type: savepnpc;
precmd: "/etc/oracle/script1 \> /tmp/pre.out 2\>&1";
pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1"; ;
abort precmd with group: No;
The precmd section finishes without any error so Legato start to backup the savesets. The postcmd also executes with no conditions so I've had to do the following:
pstcmd: "/etc/oracle/script2; /scripts/findfailed.sh /nsr/tmp/sec/sg/GroupName/*\> /tmp/post.out 2\>&1 && /etc/oracle/script3 \>> /tmp/post.out 2\>&1";
findfailed.sh looks for a string err in the inner log of Legato to make a condition which can be used to launch or not script3. I am not interested in launching script3 because it deletes files, so if backup is not ok. (This necessary cause of Oracle DBA).
It works out really good on the Legato server, but if you try it in a client it doesn't. Client hasn't a /nsr/tmp/sec/g/GroupName...
Is there any way to test the result of a backup group in the client?
Could you give some piece of advice to solve it?
Manu thanks in advance,
Iago