Subject FireBird 2.5 database restore using gbak and fix_fss_data
Author radubarbu84
I have an old database and I want to convert it to FireBird 2.5. Problem occurs when restoring the data on tables which contains blob text fields with the well know issue "gbak: ERROR:Malformed string gbak:Invalid data detected"

Steps performed:

1) gfix -user SYSDBA -password masterkey f:\dbb.db -shut -force 0
2) gfix -v -full -user SYSDBA -password masterkey f:\dbb.db
3)gbak -v -t -g -ig -user SYSDBA -Y F:\backup.log -password "masterkey" f:\dbb.db F:\dbb1.db
4)gbak -r -v -o -p 16384 -Y F:\log.txt -user SYSDBA -password masterkey "f:\dbb1.db" "f:\new.db" -fix_fss_data win1251 -rep

replacing the character set with win1252,utf8 or unicode_fss does not solve the problem.

I have also tried to migrate the data by using InterBase Data Pump version 3.4.

Steps:
1) backup the metatable
2) restore the metatable on a new database
3) migrate the data by using InterBase Data Pump

Errors encountered "Malformed string".


All the tables on which the error occur have a field of type "BLOB SUB_TYPE 1 SEGMENT SIZE 80"

I suspect that at the beginning the database had the charset WIN1252. After that someone changed the charset to UTF8 and changed all the fields definition for charset and collate from WIN1252 to UTF8.

Does anybody have an idea on how to solve this?