Subject Re: [firebird-support] Backup Firebird Error
Author Helen Borrie
At 08:20 a.m. 23/05/2013, Marco SucuzhaƱay wrote:
>When generating a backup of the database shows me the message:
>gbak: ERROR database file appears corrupt()
>gbak: ERROR wrong page type
>gbak: ERROR page 24000001 is of wrong type
>gbak: ERROR gds_$get_setment failed
>gbak: Existing before completion due to errors

It is possible that the database file is not corrupt, but contains a database with the wrong on-disk format for the version of gbak you are trying to use.

Go to the /bin/ directory of your Firebird installation and run gstat -h:

gstat -h /full/path/to/your/database

The attribute you want to look at is "ODS version".
-- if it is 10.0 then you need gbak from the Fb 1.0 installation
-- if it is 10.1 then you need gbak from the Fb 1.5 installation
-- if it is 11.0 then you need gbak from Fb 2.0 installation
-- if it is 11.1 then you need gbak from Fb 2.1 installation
-- if it is 11.2 then you need gbak from Fb 2.5 installation

Once you have a backup file made by the proper version of gbak, you can use a later version of gbak to restore the database - then, the restored database will have the ODS that matches you server version.

Helen Borrie, Support Consultant, IBPhoenix (Pacific)
Author of "The Firebird Book" and "The Firebird Book Second Edition"