Re: [Bacula-users] error about MySQL-dump file when using bpipe
2016-01-22 08:24:04
Debug output concerning mysqldump from /opt/bacula/bin/bacula-fd -d
200 -c bacula-fd.conf -f
job.c:1227-54555 P
bpipe:/srv/mysqldump.sql:/bin/sh /etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
fd_plugins.c:329-54555 plugin cmd=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
fd_plugins.c:127-54555 name=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R len=5 plugin=bpipe-fd.so
plen=5
bpipe-fd.c:215-54555 bpipe-fd:
PluginCommand=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
accurate.c:230-54555 add fname=</mysql/mysqldump.sql>
lstat=A A IHA A A A A -B BAA B BWoVsJ BWoVsJ BWoVsJ A A E
delta_seq=0 chksum=
fd_plugins.c:329-54555 plugin cmd=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
fd_plugins.c:505-54555 plugin=bpipe-fd.so plen=5
cmd=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R len=5
fd_plugins.c:127-54555 name=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R len=5 plugin=bpipe-fd.so
plen=5
fd_plugins.c:521-54555 Command plugin =
bpipe:/srv/mysqldump.sql:/bin/sh /etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
bpipe-fd.c:253-54555 bpipe-fd: pluginEvent
cmd=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
fd_plugins.c:583-54555 startBackup returned type=3,
fname=/srv/mysqldump.sql
backup.c:289-54555 FT_REG saving: /srv/mysqldump.sql
backup.c:390-54555 bfiled: sending /srv/mysqldump.sql to stored
fd_plugins.c:778-54555
send_plugin_name=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
fd_plugins.c:802-54555 send plugin start/end: 1 1 1
bpipe:/srv/mysqldump.sql:/bin/sh /etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
backup.c:1352-54555 No strip for /srv/mysqldump.sql
bpipe-fd.c:360-54555 bpipe-fd: IO_OPEN fd=7f33e4003528
reader=/bin/sh /etc/bacula/scripts/mysqldump.sh mydb
fd_plugins.c:778-54555
send_plugin_name=bpipe:/srv/mysqldump.sql:/bin/sh
/etc/bacula/scripts/mysqldump.sh
mydb:/etc/bacula/scripts/mysqldump.sh -R
accurate.c:46-54555 </srv/mysqldump.sql> not found to be
marked as seen
accurate.c:153-54555 deleted fname=/mysql/mysqldump.sql seen=0
As accurate.c complained about the file I
disabled Accurate backup, but the warning remains:
JobId 54556: Warning: Cannot stat file
/srv/mysqldump.sql: ERR=No such file or directory
--
Silver
On 22.01.2016 13:45, Silver Salonen
wrote:
I know how bpipe works and my method using script is to work
around an issue with bpipe erroring out with "Error closing stream
for pseudo file" (no idea why, but running the same mysqldump
command from inside script solves this). Contents of the script is
really straight-forward and doesn't change behavior of the dump
being sent to STDOUT:
#!/bin/sh
user=backup
pswd=PASSWORD
if [ "$1" = "-R" ]; then
/usr/bin/mysql --default-character- set =utf8 -u "$user" -p "$pswd"
else
/usr/bin/mysqldump --single-transaction
--routines --events --opt --max_allowed_packet 128M
--default-character- set =utf8 --log-error= /var/log/mysql/mysqldump_err .log -u "$user" -p "$pswd" --databases $*
fi
exit 0
BTW, I discovered that the error
"bpipe-fd: Error closing for file /srv/mysqldump.sql" was caused
of the wrong credentials I had in the script. The first error
still remains.
--
Silver
On 22.01.2016 12:55, Heitor Faria
wrote:
Hello Silver,
Hello Silver [2],
bpipe reads a command data that is directed to stdout and
stores in backup with the name you put in the 2nd variable
(fifo path) => I hope is what you are trying to achieve
with your scripts. While in restore Bacula uses the last
bpipe configuration variable (command) to read from stdin
and restore your data with the application of your choice. I
never saw a bpipe usage documentation with scripts, but with
commands directly. E.g.: Plugin =
“bpipe:/mnt/fifo/heitorfaria.sql:mysqldump -u root
-ppasswd –databases heitorfaria:mysql -u root -ppasswd″
The beauty of bpipe is you
don't need local disk space to generate the dumps since
fifos actually don't hold data (it just streams it to an
end) and you may also automate application restore directly
to it.
I recorded some videoclasses
that you can find in the same URL post I provided.
Regards,
--
=======================================================================
Heitor Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified Administrator II
========================================================================
|
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________
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>
|
- [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Heitor Faria
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Ana Emília M. Arruda
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Ana Emília M. Arruda
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Heitor Faria
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe,
Silver Salonen <=
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Wanderlei Huttel
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Wanderlei Huttel
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Kern Sibbald
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Ana Emília M. Arruda
- Re: [Bacula-users] error about MySQL-dump file when using bpipe, Silver Salonen
|
|
|