Subject Re: [firebird-support] gfix and gbak return codes in bash
Author Artur Anjos
olivier_lucaes wrote:
> Again, i do not have a large Linuxw experience, therefore maybe i'm
> doing a mistake anywhere... Any idea or tip to help me will be
> greatly appreciated.

Don't rely on error code.
What you must do is redirect the output from gbak to a file, and grep it
for 'going home'. When gbak finishes without an error, you will see the
last line of the output as:

gbak: finishing, closing, and going home

Tail the output, and grep this line to make sure it is ok.

Notice that this will not assure that you have a workable backup. You
must restore (with gbak) the result file to a different place, and
verify the restore with the same method.

Artur Anjos