New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gbak -v srv:db stdout creates a broken backup [CORE2984] #3366
Comments
Modified by: @AlexPeshkoffassignee: Alexander Peshkov [ alexpeshkoff ] |
Commented by: @AlexPeshkoff When working with this issue, I've found that stdout and stderr are incorrectly mixed in services, making some services return errors in status vector (correct behavior), others (like mentioned gbak) - as text in same way as verbose information is returned. To fix that crap, all data sent by services/utilities (this is same thing for us) was divided into 3 classes: errors, verbose info and binary data. When working as standalone utility errors are printed to stderr, verbose messages go to stdout. But when utility is outputting binary data to stdout (looks like only gbak can do it now?), verbose info also goes now to stderr. When working as service, utility does not print error messages - it sends status vector to services manager, verbose info is delivered to the user. When utility decides to send binary data to the user (only gsec does it now), delivery of verbose info should not be done. Cause gsec has no verbose info at all, no problems with it now. But when doing server-site backup (issue 2666), one more careful review of gbak may be needed. |
Modified by: @AlexPeshkoffstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5 RC3 [ 10381 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @AlexPeshkoff |
Commented by: @AlexPeshkoff When doing server-site backup, it's critical not to mix gbak data with some messages, possibly generated by gbak. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Submitted by: Damyan Ivanov (dam)
Relate to CORE2666
Before 2.5, it was possible to use the following command to create a compressed backup and watch the progress:
gbak -v srv:db stdout | gzip > db.fbk.gz
With 2.5, this creates a broken backup, because the output of the '-v' switch is sent to standard output, mixing it with the backup stream. Before 2.5 the '-v' output was sent to standard error.
More discussion in the following thread at firebird-devel
http://sourceforge.net/mailarchive/forum.php?thread_name=201004301923.52221.peshkoff%40mail.ru&forum_name=firebird-devel
Commits: 8629bea 965b851
The text was updated successfully, but these errors were encountered: