Subject Re: [firebird-support] 2GB database fix or partial backup
Author Helen Borrie
At 01:53 PM 20/04/2005 +0200, you wrote:

>I have an old interbase server running on a linux box hidden somewhere
>that was running fine until it's database size reached 2GB. gfix on
>this machine end with an I/O error.

Yes, unfortunately, interbase on an old filesystem that does not support
files > 2 Gb will corrupt the database by attempting to overwrite the file
from the beginning. As you are probably aware, you needed to pre-empt this
by adding another file to the database when the primary file reached about
1.7 Gb. However, the fact that you can still connect to it is reason for
hope: the database header is probably still almost intact.

>I tried to repair it using firebird 1.5 on Windows XP. I deleted lots
>of old data from the database, then tried gfix and gbak on it.
>gfix seems to be happy, while the database size is still 2GB after
>-sweep and -mend.

Sweeping and mending don't make a database smaller. Only a restore from a
good backup can do that.

>gbak and gstat always end with an I/O error.

If it is an old interbase database, e.g. IB 5.6 or lower, Firebird's gbak
and gstat won't work on it, even if it is not corrupt.

>Is there a known way to fix or backup a 2GB database file?

A good thing to try would be Geoff Worboys' DBak program (free download
from It should be able to recover the
structure and the good data. There won't be anything you can do to
retrieve the corrupted data, though.

>I have a very few corrupt data in this database, only the last data
>inserted, but if i try to remove these data, i get an I/O error.
>Is it possible to partially backup a database or a table?

I think DBak can be asked to step over the corrupt data. Anyway, there is
very good help text with DBak.

If you are planning to recreate the mended database on the same system,
make certain that you define the new database with at least two files.