Subject Re: gfix and gbak return codes in bash
Author olivier_lucaes
Hello Artur,
thanks for your answer.
do you mean i should do something like

../gbak -parameters..... > gfix_result.log

and grep gfix_result.log ?

I think i tried this during my tests but did not get any result
inside the file (was always empty).
I will try again and let you know.

All the best

Olivier


--- In firebird-support@yahoogroups.com, Artur Anjos <artur@a...>
wrote:
> 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