Bacula-users

Re: [Bacula-users] RunBeforeJob in background

2008-11-06 16:59:31
Subject: Re: [Bacula-users] RunBeforeJob in background
From: Arno Lehmann <al AT its-lehmann DOT de>
To: bacula-users AT lists.sourceforge DOT net
Date: Thu, 06 Nov 2008 22:55:48 +0100
Hi,

06.11.2008 11:32, Isabel Bermejo wrote:
> Hi all,
> 
> I'm trying to backup a MySQL database and in the Job Resource I define the
> command RunBeforeJob with a script that dumps the database to a fifo file. I
> need to run both at the same time, I mean I want to run the script while
> bacula runs the job. With RunBeforeJob, first dumps the database and then
> starts the backup of a file. Does anyone know how to run a script in
> background using RunBeforeJob to perform the dump and the backup job run at
> the same time?

The solution to that is to start the MySQL dump in the background. In 
your run before job script, you'd create (or make sure it's useable) 
the FIFO, then start mysqldump with an "&" at the end of the command 
line. That sends the mysqldump to the background - you'll probably 
need to detach from stdin, stdout and stderr first as these file 
handles, when kept open, can prevent Bacula from going further.

I believe I pointed you to a wiki page where a collection of sample 
scripts is presented which backs up PostgreSQL in that fashion - 
adapting those to MySQL should be possible without changing the stuff 
around the actual database interface.

Arno

> Thank you
> ISABEL
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Bacula-users mailing list
> Bacula-users AT lists.sourceforge DOT net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
> 

-- 
Arno Lehmann
IT-Service Lehmann
Sandstr. 6, 49080 Osnabrück
www.its-lehmann.de

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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>