>>>>> On Thu, 22 Sep 2005 10:34:28 +0200, Stephan Ebelt <[EMAIL PROTECTED]> 
>>>>> said:

  Stephan> Martin Simmons wrote:
  >> >> Interesting.  What is the largest number that behaves like this?
  >> 
  Stephan> looks like it's 199.
  >> 
  >> I suppose that makes sense in a warped kind of way :-)

  Stephan> ;-)

  >> >> Does returning 5 like you did initially always return in "Backup OK -- 
with
  >> >> warnings" with "Non-fatal FD errors: 1"?
  >> 
  Stephan> as ClientRunAfterJob it does.
  >> 
  >> Ah, sorry, I misread your original post and was looking at 
ClientRunBeforeJob.
  >> However, I still don't get any Non-fatal errors on FreeBSD with the
  >> ClientRunAfterJob. 

  Stephan> that means it always terminates with '*** Backup Error ***' when you 
  Stephan> exit with e.g. 5?

Correct -- a non-zero exit code from the ClientRunBeforeJob always results in
'*** Backup Error ***'.  Also, I always get 'Backup OK' regardless of the exit
code from ClientRunAfterJob.


  >> In fact, it should be impossible because that number is
  >> returned to the Director before the ClientRunAfterJob runs!

  Stephan> which number? Sorry, I may misunderstood something: but the Director 
  Stephan> should not know the return code /before/ the ClientRunAfterJob runs? 
  Stephan> (that would be an impressive piece of code - predicting the future 
;-) )

  Stephan> Or do you mean that the return code of ClientRunBeforeJob is send to 
the 
  Stephan> director before the ClientRunAfterJob is executed? That would make 
sense.

No, I meant the count of "Non-fatal FD errors" (which changes 'Backup OK' to
'Backup OK -- with warnings' when > 0).  You said that this count is 1 when
your ClientRunAfterJob script returns certain error codes, but I don't see how
that can happen.


  Stephan> hmmm, in my case not. Since I may have stored something that is not
  Stephan> (entirely) useful.
  >> 
  Stephan> The background of this is that my ClientRunBeforeJob initiates a 
Oracle
  Stephan> database full export. The actual data is written to a FIFO pipe where
  Stephan> bacula sucks the data from during the backup job. This works pretty 
well
  Stephan> so far.
  >> 
  Stephan> Finally I use the ClientRunAfterJob to parse the log file that oracle
  Stephan> creates. Since sometimes the database is not /entirely/ exported. The
  Stephan> dump might not contain everything we would need/want to restore. E.g.
  Stephan> somebody could have locked a single table. Or oracle produced a 
variety
  Stephan> of other warnings. In that case it is necessary to run the export 
again.
  Stephan> Thus the backup job should fail and notify us this way.
  >> 
  >> Ah, I see.  I don't know of any way to make that situation record a failed
  >> job.

  Stephan> hmmm, from how I understood the manual it should work exactly like 
this? 
  Stephan> It says:

  Stephan> Run After Job = <command>
  Stephan>      The specified command is run as an external program after the
  Stephan>      current job terminates. This directive is not required. The 
command
  Stephan>      string must be a valid program name or name of a shell script. 
If
  Stephan>      the exit code of the program run is non-zero, the current 
Bacula job
  Stephan>      will terminate in error. Before submitting the specified 
command to
  Stephan>      the operating system, Bacula performs character substitution as
  Stephan>      described above for the Run Before Job directive.

  Stephan>      An example of the use of this command is given in the Tips 
Chapter
  Stephan>      of this manual. As of version 1.30, Bacula checks the exit 
status of
  Stephan>      the RunAfter program. If it is non-zero, the job will be 
terminated
  Stephan>      in error.

  Stephan> [...]

  Stephan> Client Run After Job = <command>
  Stephan>      This command is the same as Run After Job except that it is run 
on
  Stephan>      the client machine. Note, please see the notes above in Client 
Run
  Stephan>      Before Job concerning Windows clients.

I've never seen it behave like that, so I suspect the doc is wrong.

__Martin


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to