>>>>> On Fri, 28 Oct 2005 11:13:30 +0200, Kern Sibbald <[EMAIL PROTECTED]> said:

  Kern> On Friday 28 October 2005 10:59, Martin Simmons wrote:
  >> >>>>> On Fri, 28 Oct 2005 08:28:31 +0700, "frank" <[EMAIL PROTECTED]> said:
  >> 
  frank> I cannot get MySQL fifo backups to work. If I run the
  frank> backup job it hangs forever waiting for the input. If I
  frank> run the job manually from the shell it works without
  frank> problems. What is going on?
  >> 
  frank> ...
  >> 
  frank> #!/bin/sh
  >> 
  frank> database=mydb
  frank> user=root
  frank> password="***"
  frank> fifo=/backup/fifo/MyDatabase
  >> 
  frank> case "$1" in
  frank> before)
  frank> echo Before backup job processing...
  frank> rm -f $fifo 2>&1 < /dev/null
  frank> mkfifo $fifo 2>&1 < /dev/null
  frank> echo Dumping $database to fifo: $fifo
  frank> mysqldump --user=$user --password=$password $database & >
  >> $fifo 2>&1 < /dev/null frank>     echo Done.
  frank> ;;
  frank> after)
  frank> echo After backup job processing...
  frank> rm -f $fifo 2>&1 < /dev/null
  frank> echo Done.
  frank> ;;
  frank> esac
  >> 
  >> Is the mysqldump process still there when the job is hanging?
  >> 
  >> What happens if you remove 2>&1?  I don't see the point in redirecting
  >> stderr to the fifo anyway, but also it will hide any error messages on the
  >> tape :-)

  Kern> In addition, I don't see any need to redirect /dev/null to the input 
for rm, 
  Kern> mkfifo, and mysqldump.

It might be worthwhile for mysqldump, because that is backgrounded so doesn't
want to be connected to the stdin of the script?

__Martin


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to