Re: [Bacula-users] FIFO Backup Questions
2015-02-28 07:55:02
On 2/27/2015 6:53 PM, Heitor Faria
wrote:
Dear Bacula Users,
1. Why FIFO isn't more popular for database dumps
backups? Is there any drawback?
2. I inserted RedFifo=yes on FileSet Options and
configured a simple RunBeforeJob script (below) to test
FIFO backup, but the backup job stalls waitng for script
termination. Am I missing something?
The FIFO special file created by mkfifo will block for read or
write until both ends of the FIFO are opened. See man
mkfifo(3).
Thanks Josh, I'm aware. I think that's why ReadFifo option
exists on Bacula:
The last line of your script is attempting to write to the FIFIO.
Bacula launches the script and waits for it to exit before
continuing with the job. So, your script is waiting on Bacula to
open the FIFO for read, but Bacula will never do so, because Bacula
is waiting on the script to exit. You cannot write to the FIFO from
the RunBeforeJob script. Instead, the script must launch a
background process to write to the FIFO and the script must exit so
that Bacula can continue the job and open the FIFO for reading.
"readfifo=yesnoIf
enabled, tells the Client to read the data on a backup and
write the data on a restore to any FIFO (pipe) that is
explicitly mentioned in the FileSet. In this case, you must
have a program already running that writes into the FIFO for a
backup or reads from the FIFO on a restore. This can be
accomplished with the RunBeforeJob directive. If this
is not the case, Bacula will hang indefinitely on
reading/writing the FIFO. When this is not enabled (default),
the Client simply saves the directory entry for the FIFO.
Unfortunately,
when Bacula runs a RunBeforeJob, it waits until that script
terminates, and if the script accesses the FIFO to write
into the it, the Bacula job will block and everything will
stall. However, Vladimir Stavrinov as supplied tip that
allows this feature to work correctly. He simply adds the
following to the beginning of the RunBeforeJob script:
exec > /dev/null"
Ps.: I tried the exec > /dev/null
[ -p /tmp/tubo ] ||mkfifo
/tmp/tubo
ls -l > /tmp/tubo
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel
Website, sponsored
by Intel and developed in partnership with Slashdot Media, is
your hub for all
things parallel software development, from weekly thought
leadership blogs to
news, videos, case studies, tutorials and more. Take a look
and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/ _______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users
|
|
|