Issue Details (XML | Word | Printable)

Key: CORE-2251
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Alexander Peshkov
Reporter: Kirill Nesterenko
Votes: 6
Watchers: 5

If you were logged in you would be able to see more operations.
Firebird Core

gbak doesn't return error code

Created: 21/Dec/08 05:51 PM   Updated: 15/Jan/20 01:09 PM
Component/s: GBAK
Affects Version/s: 2.1.1, 2.1.2, 2.5.0, 4.0 Beta 1, 3.0.5
Fix Version/s: 4.0 Beta 2, 3.0.6

Environment: OS independent

QA Status: Done successfully

 Description  « Hide
gbak doesn't return error code when used with service manager and output redirected into the non-accessible file.

E.g. bat file (there is no drive Z on the target machine):
gbak.exe -t -se C:\db.fdb c:\db.fbk -y z:\log.txt -user SYSDBA -password masterkey
@echo %errorlevel%
returns exit code 0 instead of 1.

If "-y z:\log.txt" part is removed - then correct errorcode 1 is returned.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Ivan Pisarevsky added a comment - 25/Apr/19 02:09 PM
Linux, FB3.0.5, build 33100

gbak -c -user "$IBUSER" -pass $2 -v -y "$PRTPATH/$1.rpr" "$ARCPATH/$1.gbk" "$TSTPATH/$1.gdb" -SE localhost:service_mgr

if no access to file $ARCPATH/$1.gbk I can see error message:

gbak: ERROR:cannot open backup file /ibbackup/****.gbk
gbak: ERROR: Exiting before completion due to errors
gbak:Exiting before completion due to errors

if no access to file $PRTPATH/$1.rpr there is no error message!