Subject Re: [ib-support] restoring database to firebird
Author Helen Borrie
At 12:47 AM 18-06-02 +0000, you wrote:
>I installed firebird on a server that didn't have a previous version
>of InterBase on it. I backed up the InterBase 4.1 database with the
>server manager to a .gbk file. I copied the the backedup copy to the
>new server. What is the command for restoring to the firebird in
>dialect 1 and what about the user passwords from the older database.
>They reside on the older system as the isc4.gdb.

Decide and/or do the following:

1. ...where on the server's hard disk system you want the database to
be. Create a directory for it.
2. ...what you want the page_size to be. I recommend 8192 as a useful
size; but you can also choose 1024 (not recommended), 2048, 4096 or 16384
(I don't recommend the 16Kb size unless you have a special requirement, as
it's quite likely to slow down performance except in the special conditions
for which a very large page is wanted).
3. In 4.1, make a backup of your isc4.gdb, writing the gbk file to
*somewhere else*, e.g. the Firebird root directory. (If I remember
correctly, there is already an isc4.gbk in the root of the 4.1 installation
- don't overwrite that, as it provides a fallback for when the sysdba
password gets lost).

1. Here's how to do a create restore:

IMPORTANT :: If the sysdba password is different in the 4.1 server, change
the password in the new server, to match the old one. This will avoid a
panic posting to the list. <g>

From the MSDOS window, go to Program Files\Firebird\bin and run gbak as
sysdba, as follows (assuming you are going to keep databases in D:\data\
and you have the gbk file in D:\data\gbk\)

gbak -c "D:\data\gbk\MyDatabase.gbk" "D:\data\MyDatabase.gdb" -page_size
8192 -user "sysdba" -password "masterkey"

(using your own sysdba password, of course!)

gbak will restore the database as Dialect 1.

2. Here's what to do about restoring isc4.gdb...

a) restore your previously backed up isc4.gbk file as described above for
DIRECTORY. Give the gdb file a temporary name.

b) use an interactive client such as IB_SQL or ISQL (if you are happy with
using ISQL) to connect to the temp. security database. If using IB_SQL,
open the browser and just check that all your users are there as expected.

c) Shut down the Firebird server.

d) Rename the isc4.gdb which is in the Firebird root directory.

e) Move the restored temp. isc4.gdb into the Firebird root directory and
rename it to isc4.gdb.

That should do it.


All for Open and Open for All
Firebird Open SQL Database · ·