FirebirdSQL logo

-⁠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

-⁠CRYPT

Crypt plugin name.

Syntax
-CRYPT cryptplugin

The -⁠CRYPT option will generally need to be combined with the [gbak-cmdline-keyholder] and [gbak-cmdline-keyname] options.

On backup of a non-encrypted database, the -⁠CRYPT option specifies the encryption plugin to use to encrypt the backup file.

When backing up an encrypted database, specifying -⁠CRYPT is not necessary as by default it will use the same plugin and key as the database itself.

On restore of a non-encrypted backup, the -⁠CRYPT option will encrypt the new database using the specified plugin.

It is not possible to backup an encrypted database to an unencrypted backup file, or to restore an encrypted backup file to an unencrypted database.

Note

The database is first encrypted right after creation and only after the encryption configuration is set in the header.This is a bit faster than a “restore-then-encrypt” approach, but, mainly, it is to avoid having non-encrypted data on disk during the restore process.

Note
Introduced in Firebird 4.0.

-⁠Z

Display version information.

This option displays information about the version of gbak being used, and optionally, a database.To obtain the version of gbak only, run the command as follows:

tux> gbak -z

gbak:gbak version LI-V2.5.0.26074 Firebird 2.5
gbak: ERROR:requires both input and output filenames
gbak:Exiting before completion due to errors

tux> echo $?
1

This displays the current version of gbak, and after displaying a couple of error messages, exits with an error code of 1 as shown above by the echo command.This method does not attempt to backup any databases and does not require a username and password to be defined or supplied.

If you wish to display the version number of the gbak utility and also details of database, you must supply a valid database name and backup filename, as follows:

tux> gbak -z employee employee.fbk -user sysdba -password secret

gbak:gbak version LI-V2.1.3.18185 Firebird 2.1
gbak:    Version(s) for database employee
Firebird/linux (access method),version LI-V2.1.3.18185 Firebird 2.1
Firebird/linux (remote server),version LI-V2.1.3.18185
Firebird 2.1/tcp (tux)/P11
Firebird/linux (remote interface), version LI-V2.1.3.18185
Firebird 2.1/tcp (tux)/P11
on disk structure version 11.1

tux> echo $?
0

You will note from the above that a valid username and password must be defined on the command line, or by the use of environment variables ISC_USER and ISC_PASSWORD.This version of the command will exit with a error code of zero.

Warning

This method of calling gbak will make a backup of the database.If your database is large, this can take some time to complete and the backup file specified will be overwritten if it already exists.Beware.

Note
The output above has been modified to allow it to fit the page width for a PDF.