FirebirdSQL / firebird

Firebird server, client and tools
https://www.firebirdsql.org/
1.2k stars 208 forks source link

gbak v4/v5 can't backup database from Firebird 2.5 server #8128

Open hmoffatt opened 1 month ago

hmoffatt commented 1 month ago

I have a Firebird 2.5 server running on port 3050 and I'm attempting to use gbak in Firebird v5 to make a backup. This fails with an error.

$ /opt/firebird/bin/gbak -z -B localhost/3050:sessions sessions.fbk
gbak:gbak version LI-V5.0.1.1399 Firebird 5.0 77af75c
gbak:    Version(s) for database "localhost/3050:sessions"
    Firebird/Linux/AMD/Intel/x64 (access method), version "LI-V2.5.8.27089 Firebird 2.5"
    Firebird/Linux/AMD/Intel/x64 (remote server), version "LI-V2.5.8.27089 Firebird 2.5/tcp (dbtest1)/P12"
    Firebird/Linux/AMD/Intel/x64 (remote interface), version "LI-V5.0.1.1399 Firebird 5.0 77af75c/tcp (dbtest1)/P12"
    on disk structure version 11.2
gbak: ERROR:invalid request BLR at offset 50
gbak: ERROR:    data operation not supported
gbak:Exiting before completion due to errors

I have tried the following all without success:

hvlad commented 1 month ago

Ability of gbak to backup database in ODS 11.1 and ODS 11.2 was broken when feature "SQL Security" (#42) was introduced in v4, unfortunately. The new field RDB$SQL_SECURITY has been added to the few system relations and some gbak queries for ODS 11.1 includes it. The problem is that RDB$SQL_SECURITY have type boolean that is not known to the Firebird 2.x