Networker

Re: [Networker] Run a script when a group completes?

2008-08-14 04:50:11
Subject: Re: [Networker] Run a script when a group completes?
From: Preston de Guise <enterprise.backup AT GMAIL DOT COM>
To: NETWORKER AT LISTSERV.TEMPLE DOT EDU
Date: Thu, 14 Aug 2008 18:46:52 +1000
anandhg wrote:
You can either use "savepnpc" to execute prescript & postscript during backup or you can execute a script in the notification (but this will be applicable for all the groups, something like sending a savegrp completion report)


Isn't savepnpc ran on teh clients in the group? Im hoping to find a way to run a script on the networker server after the entire group successfully completes.. It doesnt look to me like this is a built in functionality though?

Not exactly, but it's easy enough to simulate if you're prepared for a little scripting.

(Incidentally, that to me is the joy of using NetWorker - it's such an extensible backup product via scripting).

In the past when I've needed to do this, I've created a "wrapper" save group with a single client (e.g., the backup server in it) with a single file saveset and a custom backup command.

The custom backup command is a script you write that will first run the group that you really want to have run, then do the command once the group finishes. To avoid the wrapper group being deemed as a failure, run save then just for the single file, including arguments of "-LL -q" so that save outputs in a format that savegrp expects.

In that scenario, the wrapper group saveset is largely irrelevant, so you may want to set "-e tomorrow" in the command to also have the sentinel saveset expire after a day...

Cheers,

Preston.

--
Preston de Guise


"Enterprise Systems Backup and Recovery: A Corporate Insurance Policy", due out September 17 2008:

http://www.crcpress.com/shopping_cart/products/product_detail.asp?sku=AU6396&isbn=9781420076394&parent_id=&pc=

http://www.enterprisesystemsbackup.com

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