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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to execute post job only if Backup Job was succesful ?

Status
Not open for further replies.

MischkeW

Technical User
Jan 31, 2002
4
DE
Running Networker 6.0x on Solaris Sparc, Backing up a few Files on another Server and trying to use postjob (savepnpc)
to delete them but only if Backup Job was SUCCESSFUL.
Currently i had to learn that legato executes Post Job
even though Backup group was aborted.

anyone has a hint ?? Thank you
 
Hmm... Maybe you could create a script that reads the daemon log looking for success from the most recent backup?

Unfortunately, the success or failure of a backup isn't determined until after the post backup job completes.

 
A scripting solution would be to use nsradmin. Show the group with its results which are dynamically created during runtime. Then check the output and continue based on the result.

This code would give you the number of failed savesets for a given group:

Code:
nsradmin -i - << EOF | grep failed | wc -l
. type: nsr group; name: YOUR_GROUP_NAME_HERE
show completion
print
EOF[\code]

Hope it helps

Johanes
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top