> I discover problem with RunScript directive in version 2.0.2 and now in
> 2.0.3 too.
> I have next directive in Job resource:
> RunScript {
>    RunsWhen = After
>    RunsOnSuccess = yes
>    Command = "/etc/bacula/scripts/disk_check.sh %j"
> }
>
> and the script disk_check.sh is following:
> size=`/usr/bin/mysql -e "select JobBytes from Job where Job='$job'" -u
> bacula -D bacula -pxxx | tail -n 1`
> echo $size >>/etc/bacula/working/watchdog.log
>
> After backup job, $size return "0".
>
> In version: 1.38.11 this script return the right number, but after
> upgrading to Bacula 2.0.2 or 2.0.3 I have this problem.
> PLS, do you have some idea to improve it?

If you want execute your script on director, you must
specify RunsOnClient = no, it will be executed a the end of
job, but before job cleanup and report.... It's not like in 1.38 and will be
fix in the next release.

You can use something like this for the moment

#!/bin/sh

(
sleep 10               # or a "echo wait job=$job | bconsole"
size=`/usr/bin/mysql -e "select JobBytes from Job where Job='$job'" -u
                  bacula -D bacula -pxxx | tail -n 1`
echo $size >>/etc/bacula/working/watchdog.log
) &

you will be sure that your command will be executed after the end of job.

Bye

> Thanx
>
>
> Ondra
>
> Kern Sibbald napsal(a):
> > Hello,
> >
> > I'm considering the following ideas for the next couple of Bacula
> > releases, and would like your ideas.
> >
> > 1. Release version 2.0.4 in the next week or two with a couple more bug
> > fixes.
> >
> > 2. Release either version 2.0.5 or more likely version 2.2.0 within 4-8
> > weeks, targeting 6 weeks.
> >
> > Version 2.2.0, would be essentially the current Bacula trunk, which has
> > the following major changes from the 2.0.x stream:
> >
> > 1. The new SQL attribute insertion code, which runs significantly faster
> > on PostgreSQL, and for multiple simultaneous jobs runs with much less
> > database locking.
> >
> > 2. The red/black in memory restore code, which in my tests on restoring
> > 800K+ files, ran over 500 times as fast as the current code.
> >
> > 3. Some important new communications protocols that support bat.
> >
> > 4. A first cut of bat that "roughly" implements the same features as the
> > gnome-console.  This is not much, but it does give a base for further
> > incremental improvements, and will permit easier user participation in
> > the development.
> >
> > 5. The additional features that Eric has already added (Scratch pool,
> > ...).
> >
> > 6. Possibly a few additional features depending on what the developers
> > respond to this email.
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Bacula-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/bacula-devel

-- 
"I like when it comes by night and sucks the vital essence from 
my ....computers."

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to