So far no luck.

Kern Sibbald wrote:
> In addition, I don't see any need to redirect /dev/null to the input for rm, 
> mkfifo, and mysqldump.  It probably won't hurt anything, but it just 
> complicates understanding what is really going on.  A cleaner script would
> be:
> 

Changed the script as indicated. The job is still hanging...

Martin Simmons wrote:
> Is the mysqldump process still there when the job is hanging?
>

Yes, the process is there:

ps -ef |grep MyDatabase
root     27088 32601  0 19:32 ?        00:00:00 [MyDatabase] <defunct>
root     27091     1  0 19:32 ?        00:00:00 /bin/sh 
/backup/scripts/MyDatabase before


Furthermore the status of the director:

Running Jobs:
 JobId Level   Name                       Status
======================================================================
    65 Full    MyDatabaseFull.2005-10-28_19.32.05 is running


Status of the FD:

Running Jobs:
JobId 65 Job MyDatabaseFull.2005-10-28_19.32.05 is running.
    Unknown Type Job started: 28-Oct-05 19:32
    Files=0 Bytes=0 Bytes/sec=0
    Files Examined=0
    SDReadSeqNo=3 fd=5
Director connected at: 28-Oct-05 19:35


Status of the SD:

Running Jobs:
Full Backup job MyDatabaseFull JobId=65 Volume="" device="/backup"
    Files=0 Bytes=0 Bytes/sec=0
    FDReadSeqNo=5 in_msg=4 out_msg=3 fd=5


Any idea what is going on?

regards
Frank



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Kern Sibbald
Sent: Friday, October 28, 2005 4:14 PM
To: bacula-users@lists.sourceforge.net; [EMAIL PROTECTED]
Cc: Martin Simmons
Subject: Re: [Bacula-users] mysqldump using fifo

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 :-)

In addition, I don't see any need to redirect /dev/null to the input for rm, 
mkfifo, and mysqldump.  It probably won't hurt anything, but it just 
complicates understanding what is really going on.  A cleaner script would
be:

#!/bin/sh

database=mydb
user=root
password="***"
fifo=/backup/fifo/MyDatabase

case "$1" in
  before)
    echo "Before backup job processing..."
    rm -f $fifo
    mkfifo $fifo
    echo "Dumping $database to fifo: $fifo"
    mysqldump --user=$user --password=$password $database > $fifo &
    echo "Done."
    ;;
  after)
    echo "After backup job processing..."
    rm -f $fifo
    echo "Done."
    ;;
esac


>
> __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

--
Best regards,

Kern

  (">
  /\
  V_V


-------------------------------------------------------
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



-------------------------------------------------------
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