gbak backup drops ERROR:value exceeds the range for valid timestamps

753 views
Skip to first unread message

Harald Wolf

unread,
Jan 4, 2022, 4:45:46 AM1/4/22
to firebird...@googlegroups.com
Hi,
when executing:
c:\...gbak -backup UDC.FDB UDC.fdk -user sysdba -password masterkey
i get the errors:
gbak: ERROR:value exceeds the range for valid timestamps
gbak: ERROR:gds_$receive failed
gbak:Exiting before completion due to errors
------------------------------------------------------------------------------------------------------
I found no solution on my web search..

How can i fix this Problem?

Mark Rotteveel

unread,
Jan 4, 2022, 4:50:45 AM1/4/22
to firebird...@googlegroups.com
What is the Firebird version of the source database? Which version of
gbak did you use to create the backup? What is the Firebird version of
the restore target? Which version of gbak did you use for the restore?

Possibly your source database contains timestamp values that are no
longer valid in the target server version (IIRC, older versions allowed
values outside year range 1 - 9999). If that is the cause, you will need
to fix things in the source database, create a new backup and try to
restore that.

Mark
--
Mark Rotteveel

Harald Wolf

unread,
Jan 4, 2022, 5:45:36 AM1/4/22
to firebird...@googlegroups.com
Hi Mark,
there is only one firebird server running on this machine serving 3 Databases.
A nightly "gback -backup.. " task backups thes Databases one of them ("c:\udc\201\data\UDC.FDB") fails.
The Versions are:
    isql -z: ISQL Version: WI-V2.5.9.27139 Firebird 2.5
    gbak -z: gbak:gbak version WI-V2.5.9.27139 Firebird 2.5

2 of the 3 Databases are created at the same time
c:\udc\201\data\UDC.FDB drops that error running "gbak -backup ...."
the other(s) works well.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
C:\>gstat -h c:\udc\201\data\UDC.FDB

Database "c:\udc\201\data\UDC.FDB"
Gstat execution time Tue Jan 04 11:21:36 2022

Database header page information:
        Flags                   0
        Checksum                12345
        Generation              886041
        Page size               16384
        ODS version             11.2
        Oldest transaction      871583
        Oldest active           884560
        Oldest snapshot         884560
        Next transaction        884561
        Bumped transaction      1
        Sequence number         0
        Next attachment ID      2942
        Implementation ID       26
        Shadow count            0
        Page buffers            0
        Next header page        0
        Database dialect        3
        Creation date           Jun 20, 2016 10:44:40
        Attributes              force write

    Variable header data:
        *END*

C:\>gstat -h c:\udc\202\data\UDC.FDB

Database "c:\udc\202\data\UDC.FDB"
Gstat execution time Tue Jan 04 11:22:30 2022

Database header page information:
        Flags                   0
        Checksum                12345
        Generation              313550
        Page size               16384
        ODS version             11.2
        Oldest transaction      293113
        Oldest active           309839
        Oldest snapshot         309839
        Next transaction        309840
        Bumped transaction      1
        Sequence number         0
        Next attachment ID      6052
        Implementation ID       26
        Shadow count            0
        Page buffers            0
        Next header page        0
        Database dialect        3
        Creation date           Jun 20, 2016 10:44:14
        Attributes              force write

    Variable header data:
        *END*


--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/862d7c61-3e56-2f5d-6334-228797d2e2ba%40lawinegevaar.nl.

Dimitry Sibiryakov

unread,
Jan 4, 2022, 5:55:45 AM1/4/22
to firebird...@googlegroups.com
'Harald Wolf' via firebird-support wrote 04.01.2022 11:45:
> A nightly "gback -backup.. " task backups thes Databases one of them
> ("c:\udc\201\data\UDC.FDB") fails.

Run gbak with -v switch to find out which table the problematic value is in.
Then run SELECT FOR UPDATE ORDER BY <primary key> from this table to find out
which row the value is. Then fix it.
You also can use IBSurgeon or IBExpert tools to dump database pages to find
out which exactly value it was if you are curious.

--
WBR, SD.

Harald Wolf

unread,
Jan 4, 2022, 11:33:41 PM1/4/22
to firebird...@googlegroups.com
i did the "select * from log for update of id;" and the result is:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                   ID                      ZEIT    REVID           UPDATEDBY   WAS                                
===================== ========================= ======== ================================================
               198739 2018-07-19 19:00:50.1080                   198717 SYÚDBA      Update: 2018-07-19 18:44:21.5030    
               198740 2018-07-19 19:01:19.0770                   198723 SYSDBA      Update: 2018-07-19 18:48:41.7270    
               198742 2018-07-19 19:01:46.9080                   198723 SYSDBA      Update: 2018-07-19 18:48:41.727
 -8970181431929927593 2018-07-19 19:03:22.4890      198723 SYSDBA      Update: 2018-07-19 18:48:41.7270    
               198744 2018-07-19 19:04:03.7980                   198741 SYSDBA      Update:)2018-07-19 19:01:43.1790    
               198745 2018-07-19 19:05:10.2230                   198723 SYSDBA      Update: 2018-07-19 18:48:41.7270    
               198748 2018-07-19 19:06:06.6640                   198729 SYSDBA      Update: 2018-07-19 18:53:01.0150    
               198749 2018-07-19 19:07:42.3390                   198729 SYSDBA      Update: 2018-07-19 18:53:01.0150    
               198750 2018-07-19 19:08:23.8970                   198747 SYSDBA      Update: 2018-07-19 19:06:03.0910    
               198748 2018-07-19 19:09:31.1020                   198729 SYSDBA      Update: 2018-07-19 18:53:01.0152    
               198752 2018-07-19 19:09:59.6660                   198735 SYSDBA      Update: 2018-07-19 18:57:22.3780    
Statement failed, SQLSTATE = 22008

value exceeds the range for valid timestamps
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
there are some unexpected characters. The "SYÚDBA" at first line and the 😀 next the incredible ID.
I tried to:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
SQL> delete from log;
Statement failed, SQLSTATE = 08001
I/O error during "ReadFile" operation for file "C:\DATA\ELRINGKLINGER\UDC\201\UDC\UDC.FDB"
-Error while trying to read from file
-Ende der Datei (EOF) erreicht.
SQL> delete from log where id=-8970181431929927593;
Statement failed, SQLSTATE = 08001
I/O error during "ReadFile" operation for file "C:\DATA\XXXXXXXXXXXX\UDC\201\UDC\UDC.FDB"
-Error while trying to read from file
-Ende der Datei (EOF) erreicht.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
how can this be solved?

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.

Dimitry Sibiryakov

unread,
Jan 5, 2022, 5:19:44 AM1/5/22
to firebird...@googlegroups.com
'Harald Wolf' via firebird-support wrote 05.01.2022 5:33:
> how can this be solved?

Your database seems to be corrupted. May be as the result of hardware
malfunction.
I'd recommend to restore last successful backup on a spare server and
extensively test this one.

--
WBR, SD.

Svein Erling Tysvær

unread,
Jan 5, 2022, 7:08:56 AM1/5/22
to firebird...@googlegroups.com
I don't think it will work, but I'd check whether

delete from log where rdb$db_key = <whatever the value of rdb$db_key is for the actual record in the current transaction>

worked or gave the same error as you've already experienced.

Set

--
You received this message because you are subscribed to the Google Groups "firebird-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebird-suppo...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages