Restore Database

The IBExpert Services menu item Restore Database allows you to restore the database from a backed up file.

A database restore is required in the following situations:

The main advantage of restoring the database regularly is that all the counters are set back; the TIP is now set back to the minimum available number, as is the record format counter.

Before restoring a backup file into a database, it is important to first disconnect the database! - Otherwise you could end up with a corrupt database should users try to log in and perform data operations during the restore.

Restore Options

The Files page allows the following specifications:

Restore into: Select to restore into the existing database, or create a new database. When restoring into the existing database, select from the list of registered databases; if restoring to a new database, then set the database file name not forgetting the drive and path. When restoring into a new database you may also check the option in the bottom left-hand corner, Register database after restore, which automatically opens the IBExpert Register database window following a successful restore, allowing you to immediately register your new database for work with IBExpert.

File name: Specify the backup file name which is to be restored. The […] button to the right of this row allows you to find an existing file name, drive, and path. The suffixes .GBK and .FBK are traditionally respectively used for InterBase® and Firebird backup files.

The following restore options may be checked/unchecked as wished:

Additional Options

Here are a selection of further options for databases being restored to Firebird versions 3 or 4.

Output

The restore can then be started. If the protocol option On Screen was selected, the backup is logged on the Output page.

Under normal circumstances, none of the above restore options should need to be specified. If inconsistencies between the metadata and the data itself are suspected, check the Commit After Each Table, Deactivate Indexes, and Don't Enforce Validity Conditions options.

You will be asked to login:

before the restore can start.

Please note that Firebird/InterBase® does not backup indices. It only backs up the index definition. When the database is restored Firebird/InterBase® uses this definition to regenerate the indices.

Using the Database Registration menu item, Backup/Restore default file names, paths and drives may be specified if wished, along with default backup and restore options. This information may be specified when initially registering a database in IBExpert (see Register Database) or at a later date (see Database Registration Info).

Empty pages are automatically removed during a backup and restore, which reduces the total database size.

The transaction number in the TIP is reset to zero. The cache works with considerably more efficiency following a backup and restore as the pages are reordered. It is therefore recommended not only to backup but also to restore the database regularly (e.g. once a month).

In Firebird 1.5 the memory manager allows new data sets to automatically be stored in old pages, without first having to backup and restore.

Restore IBEBlock

IBExpert automatically generates an IBEBlock, based on the options selected. Further information regarding ibec_RestoreDatabase can be found here: ibec_RestoreDatabase.

To automate the backup/restore process for your databases, you can also use the HK-Software Service Center's IBExpertBackupRestore server tool. IBExpertBackupRestore is a comprehensive utility, providing automatic backup and restore facilities for Firebird and InterBase® databases with backup file compression even an option to automatically mail backup/restore log files.