Veritas-bu

Re: [Veritas-bu] Pre/Post Script on Backup Jobs with Streams

2009-05-19 16:47:08
Subject: Re: [Veritas-bu] Pre/Post Script on Backup Jobs with Streams
From: "Green, Steven" <steven.green AT teldta DOT com>
To: <veritas-bu AT mailman.eng.auburn DOT edu>
Date: Tue, 19 May 2009 15:43:52 -0500

We have long ago "solved" (as best anyone can solve this architectural shortcoming) the handling of pre/post script with multi-stream backups. Our environment consists of Solaris master and media servers (unix). We only have a small number of hosts that use multi-streaming due to their large size (all SAP database hosts). Our solution consists of some fairly complex bpstart/bpend scripts that reside on each client to control the execution of application or policy-specific pre/post scripts. The app/host pre/post scripts are actually defined in a configuration file that is "sourced" by the generic bpstart/bpend scripts. The bpend/bpstart scripts use a fairly complex lock mechanism to ensure that one and only one stream will execute the application-specific "pre" script at the start of the backup. On the tail end the bpend scripting has logic to ensure the app-specific post script only executes in the bpend of the very last stream. Our key to this was designing a mechanism for the client to query active (and [re]queued) jobs - eg to run the bpdbjobs command. The bpdbjobs command is normally a server-side command. We wrote a fairly simple custom script, executed through the client-side bpstart/bpend, that opens a TCP socket connection to the master server and runs the bpdbjobs cmd to query the job DB. The output is filtered to include only those active/queued jobs for the client hostname (derived from a reverse lookup of the incoming IP) and pipe the output back to the client across the open TCP socket where it is further analyzed to determine how many jobs are active and still waiting to run. This entire process requires some reasonably decent Perl programming skills, but is not incomprehensible (or so I think). It has been incredibly reliable for us - not flawless mind you, but damn close. We've been using this since the 3.2 days of Netbackup. There are all manner of hypothetical scenarios that could trip up even our scripting. Thankfully, most of these scenarios rarely occur in nature.  :)

If you are on a Windows platform (master/media) then you are on your own.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/usr/local/man/steve green :: Storage Administration
Telephone & Data Systems, Inc.
608.664.8210 (immobile) :: 608.219.2106 (mobile)
 What can be asserted without evidence may be dismissed without evidence.  C.Hitchens


_______________________________________________
Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
<Prev in Thread] Current Thread [Next in Thread>
  • Re: [Veritas-bu] Pre/Post Script on Backup Jobs with Streams, Green, Steven <=