Backup and restore a Firebird-Database with gbak

Time for my next reminder.

In some of my applications I am using Firebird databases and everytime when I had to backup or restore a database I must ask google for the right gbak command.

Here are my gbak backup and restore commands for Firebird Classic Server 1.5 for Linux:


gbak -v -user SYSDBA -pas 'masterkey' /pathTo/myDatabase.fdb /pathTo/myBackup.fbk

Restore (database does not exist):

gbak -c -v -user SYSDBA -password masterkey /pathTo/myBackup.fbk /pathTo/myDatabase.fdb

Don’t forget to set the right permissions on the database file:

chown firebird /pathTo/myDatabase.fdb

Restore (database does exist):

gbak -c -r -v -user SYSDBA -password masterkey /pathTo/myBackup.fbk /pathTo/myDatabase.fdb

Further informations can be found here:

gbak: finishing, closing, and going home 😉

Comments are closed.