Bacula-users

Re: [Bacula-users] Bacula ClientRunBeforeJob

2009-10-22 04:56:14
Subject: Re: [Bacula-users] Bacula ClientRunBeforeJob
From: Christian Gaul <christian.gaul AT otop DOT de>
To: Robert Backhaus <robert.backhaus AT unister-gmbh DOT de>, bacula-users AT lists.sourceforge DOT net
Date: Thu, 22 Oct 2009 10:52:14 +0200
Robert Backhaus schrieb:
> On Wed, Oct 21, 2009 at 10:44:01AM +0200, Christian Gaul wrote:
>   
>> Robert Backhaus schrieb:
>>     
>>> Hello all,
>>>
>>> i want to backup mysql binlog files "incremetally". We wrote a script
>>> (binlog-backup), which flush the logs and writes the backupfiles to 
>>> restore.info.
>>>
>>> <config> 
>>>
>>> ClientRunBeforeJob= "/usr/local/bin/binlog-backup"
>>>  
>>> Include {
>>>   Options { signature = SHA1 }
>>>   File = "\\</data/mysql-binlog/restore.info"
>>> }
>>>
>>> </config>
>>>
>>> Now i have the effect: the bacula job reads restore.info before running the
>>> script. the result is: i backup the files a job later. An additional 
>>> cronjob on
>>> the client, i want to avoid. Currently my approach is to schedule 2 jobs: 
>>> with 
>>> ClientRunBeforeJob to create the filelist and backup a zero directory and a
>>> second (5 min later )to backup the files from restore.info. 
>>>
>>> 1) Is there a way to configure bacula, to do the Clientrunbeforjob and than 
>>> reads
>>> the filelist?
>>>
>>> 2) Is there a way to pass paramtere/variables (files to backup)  to bacula
>>>
>>> 3) Any other hints?
>>>
>>> Robert
>>>   
>>>       
>> the runbefore script should not be returning immediately, what happens
>> if you run /usr/local/bin/binlog-backup manually? do you get right back
>> to the shell or does it take a while to write the data to restore.info?
>>     
>
> the scripts runs 1 second 
>   
which doesn't really help diagnose the problem :-)
is the file writing completed at the end of the script, or does it fork
into the background to do its work?
if it forks, change it.
>  
>   
>> if the job returns right away then there is nothing bacula can do, you
>> have to fix your script to actually finish processing before returning
>> (synchronous instead of asynchronous). For me bacula waits until the
>> runbefore script(s) have finished before saving data.
>>     
>
> if i understand you right, you have an anlaog szenario - your script writes 
> a file and bacula include this file in one job and it works ... 
>
> Robert
>
>   
Yes. Simple example is mysqldump that writes the dump to a file.. you
can fork that into the background or you can wait for it to get done
writing, if you dont wait for it to finish writing bacula cant back it up.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>