Re: [Bacula-users] FIFO Backup Questions
Btw: the error is just gone (can't imagine why). And the correct script should be: screen -d -m -S mysqldump -t mysqldump su -s /bin/bash -c "mysqldump -u root -p123456 test > /tmp/bacula.sql" == Heitor Medrado de Faria - LPIC-III | ITIL-F 04 a 15 de maio: Novo Treinamento Telepresencial Bacula: http://www.bacula.com.br/?p=2174 61 8268-4220 Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: heitorfa...@gmail.com === - Mensagem original - > De: "Heitor Faria" > Cc: "bacula-users" > Enviadas: Quarta-feira, 25 de março de 2015 20:24:50 > Assunto: Re: [Bacula-users] FIFO Backup Questions > Hello all, > I managed to backup and restore a mysqll dump with FIFO. The trick was to use > the screen command and ReadFifo=yes on FileSet: > screen -d -m -S mysqldump -t mysqldump su -s /bin/bash -c "-u root -p123456 > test > /tmp/bacula.sql" > Despite of the file being copied correctly I keep receiving this scary > message on backup log: > Cannot open "/tmp/bacula.sql": ERR=Interrupted system call. > Any hints? > == > Heitor Medrado de Faria - LPIC-III | ITIL-F > 04 a 15 de maio: Novo Treinamento Telepresencial Bacula: > http://www.bacula.com.br/?p=2174 > 61 8268-4220 > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > heitorfa...@gmail.com > === > - Mensagem original - > > De: "Heitor Faria" > > > Para: "Kern Sibbald" > > > Cc: "bacula-users" > > > Enviadas: Sábado, 28 de fevereiro de 2015 11:19:20 > > > Assunto: Re: [Bacula-users] FIFO Backup Questions > > > > The answer to #1 is given in your #2 -- i.e. it is complicated, and if > > > you > > > do > > > not have a program on the other end of a FIFO doing the right thing > > > (read/write), Bacula will stall. FIFOs have their place, but you have to > > > understand them very well to make them work or debug them. > > > > > Hello Kern! Copy operations seems to trigger the end o FIFO, so I suppose > > Bacula read operation will do the trick. > > > I will keep researching. Maybe posting on a Shell Script list will be more > > fruitful. > > > Regards, > > > == > > > Heitor Medrado de Faria - LPIC-III | ITIL-F > > > 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: > > http://www.bacula.com.br/?p=2174 > > > 61 8268-4220 > > > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > > heitorfa...@gmail.com > > > === > > > > On 27.02.2015 22:59, 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? > > > > > > > > > > [ -p /tmp/tubo ] ||mkfifo /tmp/tubo > > > > > > > > > > ls -l > /tmp/tubo > > > > > > > > > > Regards, > > > > > > > > > > == > > > > > > > > > > Heitor Medrado de Faria - LPIC-III | ITIL-F > > > > > > > > > > 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: > > > > http://www.bacula.com.br/?p=2174 > > > > > > > > > > 61 8268-4220 > > > > > > > > > > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > > > > heitorfa...@gmail.com > > > > > > > > > > === > > > > > > > > > > -- > > > > > > > > > > Dive into the World of Parallel Programmin
Re: [Bacula-users] FIFO Backup Questions
Hello all, I managed to backup and restore a mysqll dump with FIFO. The trick was to use the screen command and ReadFifo=yes on FileSet: screen -d -m -S mysqldump -t mysqldump su -s /bin/bash -c "-u root -p123456 test > /tmp/bacula.sql" Despite of the file being copied correctly I keep receiving this scary message on backup log: Cannot open "/tmp/bacula.sql": ERR=Interrupted system call. Any hints? == Heitor Medrado de Faria - LPIC-III | ITIL-F 04 a 15 de maio: Novo Treinamento Telepresencial Bacula: http://www.bacula.com.br/?p=2174 61 8268-4220 Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: heitorfa...@gmail.com === - Mensagem original - > De: "Heitor Faria" > Para: "Kern Sibbald" > Cc: "bacula-users" > Enviadas: Sábado, 28 de fevereiro de 2015 11:19:20 > Assunto: Re: [Bacula-users] FIFO Backup Questions > > The answer to #1 is given in your #2 -- i.e. it is complicated, and if you > > do > > not have a program on the other end of a FIFO doing the right thing > > (read/write), Bacula will stall. FIFOs have their place, but you have to > > understand them very well to make them work or debug them. > > Hello Kern! Copy operations seems to trigger the end o FIFO, so I suppose > Bacula read operation will do the trick. > I will keep researching. Maybe posting on a Shell Script list will be more > fruitful. > Regards, > == > Heitor Medrado de Faria - LPIC-III | ITIL-F > 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: > http://www.bacula.com.br/?p=2174 > 61 8268-4220 > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > heitorfa...@gmail.com > === > > On 27.02.2015 22:59, 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? > > > > > > [ -p /tmp/tubo ] ||mkfifo /tmp/tubo > > > > > > ls -l > /tmp/tubo > > > > > > Regards, > > > > > > == > > > > > > Heitor Medrado de Faria - LPIC-III | ITIL-F > > > > > > 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: > > > http://www.bacula.com.br/?p=2174 > > > > > > 61 8268-4220 > > > > > > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > > > heitorfa...@gmail.com > > > > > > === > > > > > > -- > > > > > > 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@lists.sourceforge.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@lists.sourceforge.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FIFO Backup Questions
> The answer to #1 is given in your #2 -- i.e. it is complicated, and if you do > not have a program on the other end of a FIFO doing the right thing > (read/write), Bacula will stall. FIFOs have their place, but you have to > understand them very well to make them work or debug them. Hello Kern! Copy operations seems to trigger the end o FIFO, so I suppose Bacula read operation will do the trick. I will keep researching. Maybe posting on a Shell Script list will be more fruitful. Regards, == Heitor Medrado de Faria - LPIC-III | ITIL-F 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: http://www.bacula.com.br/?p=2174 61 8268-4220 Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: heitorfa...@gmail.com === > On 27.02.2015 22:59, 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? > > > [ -p /tmp/tubo ] ||mkfifo /tmp/tubo > > > ls -l > /tmp/tubo > > > Regards, > > > == > > > Heitor Medrado de Faria - LPIC-III | ITIL-F > > > 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: > > http://www.bacula.com.br/?p=2174 > > > 61 8268-4220 > > > Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: > > heitorfa...@gmail.com > > > === > > > -- > > > 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@lists.sourceforge.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FIFO Backup Questions
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=yesno*If 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@lists.sourceforge.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@lists.sourceforge.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FIFO Backup Questions
The answer to #1 is given in your #2 -- i.e. it is complicated, and if you do not have a program on the other end of a FIFO doing the right thing (read/write), Bacula will stall. FIFOs have their place, but you have to understand them very well to make them work or debug them. On 27.02.2015 22:59, 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? [ -p /tmp/tubo ] ||mkfifo /tmp/tubo ls -l > /tmp/tubo Regards, == Heitor Medrado de Faria - LPIC-III | ITIL-F 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: http://www.bacula.com.br/?p=2174 61 8268-4220 Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: heitorfa...@gmail.com === -- 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@lists.sourceforge.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FIFO Backup Questions
> > 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: "readfifo=yesno If 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@lists.sourceforge.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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
Re: [Bacula-users] FIFO Backup Questions
On 2/27/2015 4:59 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). [ -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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users
[Bacula-users] FIFO Backup Questions
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? [ -p /tmp/tubo ] ||mkfifo /tmp/tubo ls -l > /tmp/tubo Regards, == Heitor Medrado de Faria - LPIC-III | ITIL-F 02 a 13 de Março - Novo Treinamento Telepresencial Bacula: http://www.bacula.com.br/?p=2174 61 8268-4220 Site: www.bacula.com.br | Facebook: heitor.faria | Gtalk: heitorfa...@gmail.com === -- 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@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bacula-users