innobackupex return codes?

  • Filter
  • Time
  • Show
Clear All
new posts

  • innobackupex return codes?

    Does innobackupex return a useful code in the case of a backup failure of some kind?

    I have looked for a list of return codes, but I have not found anything. It isn't documented in the scripts "--help" feature, either. I'm not a Perl guy. So, trying to read the script didn't help me any.

    I'm using a PHP script to call the innobackupex script. I capture the return code from the exec() function and attempt to use it to handle any problems that might arise. For instance, I have a slave server that is failing to backup. Upon exiting from innobackupex, the SQL_THREAD is still shut down. So, I need to restart it. It does not appear that the return code I capture is useful for this purpose, though. I would just like to verify if the innobackupex script returns a useful code before I spend too much time debugging my PHP.


  • #2
    I would have to look at the source to be sure. The exit function in the Perl code is what determines the return/exit code. Can you check and report back? We should document this.


    • #3
      I did have a quick look at the actual Perl code of the innobackupex script, but I admit I'm not a Perl guy. I could see that it appears to return the result of the "ibbackup" execution. Whether that includes all of the other things that innobackupex does is unclear.

      I can only say this from my experience. I have a PHP script that launches innobackupex. I had been having a good deal of trouble with one of my slave servers due to a connection timeout. When innobackupex returned, the result code I got inside my PHP script was 0, despite the fact that the backup had a failure.

      There were two implications arising from this. First, the SQL Thread for the slave was not restarted. I assume this is a bug. Second, my own PHP script did not let me know that the backup had failed. Fortunately, I'm monitoring this closely right now, since it's all new to me.

      Anyway, that's why I wanted to ask about possible return codes. It seems that something isn't getting reported as it should by the innobackupex script.