Bacula-users

Re: [Bacula-users] relative order of scripts vs files

2016-04-18 05:10:52
Subject: Re: [Bacula-users] relative order of scripts vs files
From: Kern Sibbald <kern AT sibbald DOT com>
To: Lloyd Brown <lloyd_brown AT byu DOT edu>, Heitor Faria <heitor AT bacula.com DOT br>
Date: Mon, 18 Apr 2016 11:09:48 +0200
Hello,

I have not looked at your problem in detail, but it *sounds* a lot like 
what happens to a lot of first time Runscript users.  Please remember 
when Bacula executes an external command, it runs it without a shell 
(i.e. it simply executes and executable). If you want a shell to 
interpret a script, or you use any shell characters, you must explicitly 
put a shell invocation on the command.  This is explained in the manual.

Best regards,
Kern

On 04/13/2016 09:14 PM, Lloyd Brown wrote:
> Unfortunately, there's some sensitive info in the script.  I'll see if I
> can post an excerpt later.
>
> But here's what I've observed:
> - When the file doesn't exist, I get the error as described.  I've even
> attached to the bacula-fd using strace, and verified that it does try to
> open() that file, but I don't see it trying to execute the script
> - When I touch the file, to create a zero-length placholder, and then
> run the job, it successfully runs the script, which populates the file
> with the list, but the job backs up 0 bytes and 0 files
> - Subsequent runs of the same job, correctly get the file list.
>
> All of that led me to the conclusion that the file open() is occurring
> before the script.  Also that the script is updating the file correctly.
>
> Are you sure that your catalog backup is using the "Client Run Before
> Job", and not just a "Run Before Job"?  It is at least possible that the
> Client vs Server versions of the Run Before Job act slightly
> differently.  I haven't examined the source code, though, so this is
> just speculation on my part.
>
> Lloyd
>
>
>
> On 04/13/2016 10:49 AM, Heitor Faria wrote:
>> Hello, Lloyd. This does not seem accurate to me. Catalog backup job works 
>> flawless with the same logic and I'm pretty sure Bacula client only scans 
>> the filesystem after before script is terminated.
>> Are you sure your before job script is not deleting the temporary file?
>> If still in doubt maybe you can post your script here.


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users