Subject Re: [firebird-support] Reviving an old firebird database (file conversion/programming hints)
Author Helen Borrie
Hello Urs,

> 1)
> I assume on LInux (Debian based Mint version and an Ubuntu flavor) I
> install a variant of the server (in the repository I find the 2.5
> variants, but I'd be also happy installing a downloaded 3.0 instead).
> Then I need a generic DB manager like e.g. Flamerobin to do general
> operations and basic DB editing. Or is it equally possible to do that in
> the terminal?
> Is that correct?
> That's mostly correct. 64Bit Firebird might be unable to open old
> database - I came to tha Problem with an FB 1.5 database moving to FB 2.5.
> In that case you have to install either 32Bit package or an old package.

64-bit or 32-bit - does not matter. You should be able to open that
v.1.5 database with either Fb 1.5 or 2.0.6. You would probably get
some errors trying to open it in Fb 2.1 or 2.5. That has nothing to
do with 32-bit/64-bit but with changes in the on-disk structure.

BTW, Flamerobin is a useful tool but all Firebird packages come with
the isql utility, which runs in the command shell. You just have to
make sure you run it from its own bin directory with ./ because there
are other DBMS out there that have their own [incompatible] binaries
with the same name.
> 2)
> How can I determine the version of my existing database file? And how
> can I convert that to a current one in the
> expected case it isn't
> compatible with my current installation? There is only the .fdb file and
> no backup available.

Start by downloading and installing the Fb 1.5.6 tar.gz kit from ...

Put the database file somewhere on the physical filesystem of the host
machine. Use the gbak utility to take a backup which can be restored to a
higher ODS.
> Once accessible FlameRobin can tell you the version of datafile.

You don't need Flamerobin for that. In the same directory, do

./gstat -h /path/to/database
and look for the item "ODS version":
10.0 means it was created under Fb 1.0
10.1 """ Fb 1.5
11.0 """ Fb 2.0
11.1 """ Fb 2.1
11.2 """ Fb 2.5

After taking your gbak backup, decide which version you want to
upgrade to. At both 2.0 and 2.1 there were changes that need repair
when you restore the database, so read the release notes, especially
the installation and migration document, which is common to both major

> So that boils down to having to try out different versions of
> Firebird until I find one that can open the DB?

Only if you want to! ;-)

I would start with 1.5 so you have a good backup to work with. If you
decide to go straight to 2.5, read the release notes thoroughly; but
also get PDF release notes and installation docs for 2.0 and 2.1 from the
Documentation zone. Particularly look at the gbak -c[reate] options
for fixing data and metadata. because you will still need to do those fix
options when you upgrade from the v.1.5 backup to Fb 2.5.

I'd also recommend studying all the scripts that are in the tarball
kit when you decompress it.

When you get back "in the groove" you might consider doing the upgrade
to Fb 3.
Kind regards,
Helen Borrie