FirebirdSQL logo

-⁠USER

Username for authentication.

Syntax
-USER username

Allows the username of the SYSDBA or database owner user to be specified if the database is to be backed up, or, in the case of a restore (with the -⁠c[reate] switch specified), any valid username can be specified.This need not be supplied if ISC_USER environment variable exists and has a correct value for the username.

Databases can only be backed up by SYSDBA, users with the RDB$ADMIN_ROLE, the database owner, or — since Firebird 4.0 — users with the USE_GBAK_UTILITY system privilege.A restore can also be carried out by SYSDBA or the database owner, however, if the -⁠c(reate) switch is used, any authenticated user can create a new database from a backup file.In Firebird 3.0 and higher, non-admin users need the CREATE DATABASE DDL privilege to be able to restore a database.

-⁠V[ERIFY]

Display information on the backup or restore.

Normally gbak operates quietly with no information written to the display.This switch reverses that situation and causes lots of information to be displayed.The default is to display the output to the screen, but you can redirect the output to a log file using the -⁠y switch.

This option is mutually exclusive with [gbak-cmdline-verbint].Using -⁠verify is the same as specifying -⁠verbint 10000.

Caution

Contrary to its name, this option doesn’t verify anything, and it would have been better named -⁠VERBOSE.

The only way to verify a backup is to restore it, check it doesn’t complete with errors, and maybe perform some queries for sanity checking

-⁠VERBI[NT]

Verbose information with explicit interval.

Syntax
-VERBI[NT] interval

The interval controls at how many records written gbak will output information;in other words, it controls the frequency of the output of “…​ records written” messages.The minimum value is 100.

This option is mutually exclusive with [gbak-cmdline-verify].Using -⁠verify is the same as specifying -⁠verbint 10000.

Note
Introduced in Firebird 3.0.

-⁠Y

Write [gbak-cmdline-verify] output to a log file.

Syntax
-Y { filename | SUPPRESS }

Used in conjunction with the -⁠v[erify] switch to redirect status messages to a file or device, rather than the screen, or to suppress them altogether.

If -⁠y suppress is used, then no information will be written to screen regardless of whether -⁠v[erify] is specified.

If a filename is given and the -⁠v[erify] switch is specified, the file will be written to record progress, errors etc.

Warning

All known documentation on this switch mentions that the text should be "suppress_output" rather than "suppress".This is an error in the documentation as the source code for gbak shows that the switch must be "suppress".

Warning

The log file must not exist.If it does, the backup or recovery operation will fail:

tux> rm employee.log
tux> gbak -backup employee.fdb employee.fbk -y employee.log -v

tux> ls -l employee.log
-rw-r--r-- 1 firebird firebird 21610 2010-08-04 10:22 employee.log

tux> gbak -backup employee.fdb employee.fbk -y employee.log -v
gbak:cannot open status and error output file employee.log