Subject Re: [firebird-support] GBAK Error - Expected record length
Author Ann W. Harrison
Marius Labuschagne wrote:
>
> The database backup is successful (no problems reported), but the
> restore fails with the following messages when it reaches a certain
> table and it is consistently on this table, I tried to restore a couple
> of times.
>
> 04/12/2009 16:30:11:671 gbak:restoring data for table ENTITYNOTES
> 04/12/2009 16:30:11:687 gbak:committing data for table ENTITYNOTES
> 04/12/2009 16:30:11:703 gbak: 64 records restored
> 04/12/2009 16:30:11:703 gbak:do not recognize table attribute 0 --
> continuing
> ...
> continuing
> 04/12/2009 16:30:11:703 gbak:do not recognize table attribute 0 --
> continuing
> 04/12/2009 16:30:13:218 ERROR: Expected record length
> 04/12/2009 16:30:13:218 ERROR: Expected record length
>
> SQL Code: -901
> IB Error Code: 336330791
> Error Message:
> frmFirebirdDBMaintenance.srvRestore:
> Unsuccessful execution caused by system error that does not preclude
> successful execution of subsequent statements.
> Expected record length
>

If you desperately need this backup, you should look at IBBackupSurgeon
http://www.ibphoenix.com/main.nfs?a=ibphoenix&s=1259945404:893&page=ibp_backupsurgeon

The internal backup format is attribute/value. As Dmitri S. wrote,
the zeros are not valid attributes. Once the restore gets out of
sync, it has no way to scan ahead and get the next attribute - a
byte of data looks very much like an attribute code. IBBackupSurgeon
may allow you to cut out the zeros and start again at valid data.
On the other hand, a hex dump may tell you that there's nothing
in the file after the zeros start.

Using the -o switch may let you get some data restored.

Good luck,

Ann