Subject Re: [firebird-support] Can not create backup of Firebird database because of the errors
Author Ann Harrison


On Thu, Sep 20, 2018 at 5:30 AM Georgiy Kovalov gko@... [firebird-support] <firebird-support@yahoogroups.com> wrote:


At the time of backup firebird database (gbak -g -ig) I have the following error:

gbak:    writing data for table ORDERS 
gbak: ERROR:message length error (encountered 532, expected 528) 
gbak: ERROR:gds_$receive failed 
gbak:Exiting before completion due to errors

OK.  The first thing to do is to run gbak with the -o and -v options.  That will tell you which table
is causing the error.  Message length errors can be caused by compression/decompression
problems.  When you've identified the table with the error, you can probe it to find the bad
record.  Probe with a sorted, non-indexed query and you'll eventually find a record that will cause 
the same error.  
same error.  At that point, 

 

When I'm using gfix with different parameters (-v -full, -mend, -ignore), I have the message:

Summary of validation errors
        Number of index page errors     : 540

Mend is a little dangerous, but essentially it clears invalid pointers to pages and records, so you get
a null pointer instead of a bad one.  Whatever the bad one pointed to will go from unavailable to 
ready to be removed.  Certainly not the option I would use first.  Index pages errors are generally
benign.  Firebird indexes can contain pointers to deleted records after a crash or hard shutdown.
That's expected and eventually fixed if the entry is visited.
 

In firebird.log file I see the lines:

PC (Server) Thu Sep 20 08:37:01 2018
    Database: E:\...GDB
    Index 2 is corrupt on page 134706 level 1. File: ..\..\..\src\jrd\validation.cpp, line: 1699
     in table COMPONENTS (197)



That's a problem that can be fixed by rebuilding the index.  However, it's unlikely to be the source
of your gbak problem because gbak doesn't backup or reference user defined indexes.  

Good luck,

Ann