Subject Re: [firebird-support] Re: migrate from firebird 1.5 32bit to firebird 2.5 64bit on linux
Author Paul Vinkenoog
You wrote:

> ok i ran the command
> gbak -fix_fss_metadata -r -user sysdba -password pass /opt/firebird/fbbackup/stock.fbk /ibdata/stock.fdb
>
> got the following error
> gbak: ERROR:file /opt/firebird/stock.fbk is not a valid database

Please look at the documents in misc/upgrade/metadata, especially metadata_charset.txt.
The syntax for the special gbak switches is:

-FIX_FSS_METADATA <charset>
and/or
-FIX_FSS_DATA <charset>

So you have to supply the character set that your (meta)data are currently in. In the backup file, that is.
Gbak will then transliterate them to well-formed UNICODE_FSS.

Notice that these switches only affect table columns that are (supposed to be) in UNICODE_FSS.

Also, use -c rather than -r when restoring, and choose a file name that doesn't exist yet in the directory.

*Supposing* the metadata in your backup (made under 1.5, very good) are in UTF8, you would invoke gbak like this:

gbak -user sysdba -password pass -c -fix_fss_metadata utf8 /opt/firebird/fbbackup/stock.fbk /ibdata/stock_test_from_utf8.fdb

And if they are in (possibly broken) UNICODE_FSS:

gbak -user sysdba -password pass -c -fix_fss_metadata unicode_fss /opt/firebird/fbbackup/stock.fbk /ibdata/stock_test_from_fss.fdb

(not sure of this last one makes any difference compared with omitting the switch, btw)

etc.

I've never had to do this myself, so after this I haven't got any more tips for you. But maybe this is enough to get you going. If not, somebody else will have to step in.


Good luck,
Paul Vinkenoog