Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GBAK can't restore database due to 'do not recognize table attribute' [CORE6321] #6562

Closed
firebird-automations opened this issue May 29, 2020 · 8 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Rodrigo Gonçalves (keitarobr)

Dear all,

one of our clients has a large database (around 196GB) and the disk where it was hosted has crashed (without change of recovery).

Thankfully they had a backup (made with with gbak) but did not perform a restore to check the integrity of the backup, thus we have only the FBK file.

Now they are trying to restore the database but the following error appears at about 80GB of data restored:

gbak:do not recognize table attribute 0 -- continuing
gbak:do not recognize table attribute 0 -- continuing
gbak:do not recognize table attribute 0 -- continuing

Trying to restore just the metadata, for testing, results in the same error.

This happens at a table with the following structure:

SQL> show table table_name;
field1 INTEGER Not Null
field2 INTEGER Nullable DEFAULT NULL
field3 INTEGER Nullable DEFAULT NULL
field4 CHAR(40) Nullable DEFAULT NULL
field5 BLOB segment 80, subtype BINARY CHARACTER SET NONE Nullable DEFAULT NULL
field6 BLOB segment 80, subtype BINARY CHARACTER SET NONE Nullable DEFAULT NULL
field7 INTEGER Nullable
field8 INTEGER Nullable
field9 INTEGER Nullable
field10 INTEGER Nullable

After trying all gbak standard options, while looking at its source code I've found the "SKIP_BAD_DATA" option to try. I've tried it using both a large number (16384) and a small number (1) with no success. Is there a way to find out the possible numbers to try?

The command used was:

/opt/firebird/bin/gbak -REP -K -N -I -r -v -p 16384 backup.GBK database.FDB -user sysdba -pass masterkey

Also, I've tried finding some documentation regarding the FBK/GBK file format, so that we could build a tool to extract the data manually and pump it to a clean database. But did not find any documentation. Is it available online somewhere?

@firebird-automations
Copy link
Collaborator Author

Commented by: @aafemt

It is usual error if you try to restore Interbase backup on Firebird server thus not a bug. Next time use support list for support questions.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Further to Dimitry, how did you confirm which database engine (Firebird vs. Interbase) and version #⁠ the client was using?

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

Issue is not confirmed to be with Firebird release

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

Version: 3.0.5 [ 10885 ] =>

Version: 2.5.9 [ 10862 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Rodrigo Gonçalves (keitarobr)

Dear Dimitry and Sean,

the database was running in the same Firebird version in which the restore is being tried: ISQL Version: LI-V2.5.8.27089 Firebird 2.5

Only the disk with the database crashed. The OS disk did not suffer a failure, thus it is the same installation.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

That's definitely not firebird bug. Most of your questions should be asked at support list.

What about format of gbak file. I do not know any source of documentation about it. Format is in many aspects simple:

attribute value, data length, data

Known attributes may be found in src/burp/burp.h. The main trickery is data length - depending upon attribute it can be one, two or fours bytes. I'm afraid that teh only way to study where what format is used is to read gbak sources.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant