How to convert firebird 1.0 to firebird 5?

380 views
Skip to first unread message

peter shaw

unread,
Aug 8, 2024, 7:05:06 AM8/8/24
to firebird-support
Hi,

I want to update my firebird database to firebird 5. I thought the database is firebird 2. but the update wasn't successful. I download the flamerobin to open the database, I got an error, it said the database is osd 10, flamerobin supports osd 13.

So, I thought database version was the problem. According to firebird doc, the osd 10 is firebird 1 or interbase 6.

We actually created the database in IB 6, and later, we installed firebird 2, we rename the database extension name to .fdb. It works fine with firebird server.

I just installed Firebird-1.0.3.972-Win32.

I used firebird's gbak to backup it, I got the error message "Error: unavailable database".

I used ib console 1.0.0.315 to backup the database, and then used gbak to restore it, I got the error message: "Error: Expected backup version 1, 2, or 3. Found 7"

How to solve the problem? Thank you.

Dimitry Sibiryakov

unread,
Aug 8, 2024, 7:16:37 AM8/8/24
to firebird...@googlegroups.com
peter shaw wrote 08.08.2024 13:05:
> How to solve the problem?

1) Install Firebird 5 on a separate server.
2) Create a new database from script.
3) Pump data from the old database on the old server into the new database on
the new server.

--
WBR, SD.

peter shaw

unread,
Aug 8, 2024, 8:14:49 PM8/8/24
to firebird-support
How to pump data from old to new? Are there ways to do that without writing a software to do the task? Thanks.

Mark Rotteveel

unread,
Aug 9, 2024, 4:39:22 AM8/9/24
to firebird...@googlegroups.com
On 08/08/2024 13:05, peter shaw wrote:
> I want to update my firebird database to firebird 5. I thought the
> database is firebird 2. but the update wasn't successful. I download the
> flamerobin to open the database, I got an error, it said the database is
> osd 10, flamerobin supports osd 13.

It is not FlameRobin that produces that error, but your Firebird server.
Firebird 3.0 *only* supports ODS 12.0, Firebird 4.0 only supports ODS
13.0, Firebird 5.0 supports ODS 13.0 and 13.1.

> So, I thought database version was the problem. According to firebird
> doc, the osd 10 is firebird 1 or interbase 6.
>
> We actually created the database in IB 6, and later, we installed
> firebird 2, we rename the database extension name to .fdb. It works fine
> with firebird server.

That is because Firebird 2.0 supports ODS 10.0 and ODS 11.0, Firebird
2.1 supports 10.0, 11.0 and 11.1, Firebird 2.5 supports 10.0, 11.0 and 11.2.

> I just installed Firebird-1.0.3.972-Win32.

You didn't need to do that. The server installation you already had
should be good enough.

> I used firebird's gbak to backup it, I got the error message "Error:
> unavailable database".

You can get that error if you use the wrong commandline, so exactly how
did you try to backup (what was the exact commandline), and was there
possibly a server of a different version running?

> I used ib console 1.0.0.315 to backup the database, and then used gbak
> to restore it, I got the error message: "Error: Expected backup version
> 1, 2, or 3. Found 7"
>
> How to solve the problem? Thank you.

Don't use ibconsole, use gbak, of the Firebird 2.0 server instance you
already have.

However, as Dimitry said, it might be easier to recreate your database,
taking into account the last 25 years of changes in Firebird, and
pumping the data over.

Mark
--
Mark Rotteveel

Dimitry Sibiryakov

unread,
Aug 9, 2024, 5:31:40 AM8/9/24
to firebird...@googlegroups.com
peter shaw wrote 09.08.2024 2:14:
> How to pump data from old to new? Are there ways to do that without writing a
> software to do the task?

You can use ready-to-use software such as IBDataPump or FBCopy. You also can
use EXTERNAL DATA SOURCE functionality.

--
WBR, SD.

peter shaw

unread,
Aug 9, 2024, 7:10:47 AM8/9/24
to firebird-support
Hi,

Thank you for your help.

I started cmd, change directory to the firebird bin folder, then run the following command to do the backup and restore.

To backup firebird:
gbak -b -user SYSDBA -password masterkey path_to_firebird.fdb path_to_backup.fbk

To restore firebird:

gbak -c -v -user SYSDBA -password masterkey path_to_backup.fbk path_to_restore.fdb


On Friday, August 9, 2024 at 7:31:40 PM UTC+10 sd wrote:
You can use ready-to-use software such as IBDataPump or FBCopy. You also can
use EXTERNAL DATA SOURCE functionality.

II will try these. Is "EXTERNAL DATA SOURCE functionality" using old firebird database to produce external files, then load the files into temp tables in new firebird database, finally move the data from temp tables to real tables?

Peter

peter shaw

unread,
Aug 12, 2024, 5:11:12 AM8/12/24
to firebird-support
I found the errors was caused by missing localhost: before a drive letter for the database name (fdb or gdb)

Joaozinho

unread,
Aug 13, 2024, 6:10:43 AM8/13/24
to firebird...@googlegroups.com
I suggest you to try the following:

- backup the original database with the embedded version 1.5.6;
- restore the backup with embedded version 2.5.9;
- backup the restored database with embedded version 2.5.9;
- restore the last backup on the newest server (3, 4 or 5).
> --
> 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-
> support+u...@googlegroups.com <mailto:firebird-suppo...@googlegroups.com>.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/firebird-support/
> fd64f58b-8f87-4f1e-980d-872611325771n%40googlegroups.com <https://groups.google.com/d/msgid/firebird-support/
> fd64f58b-8f87-4f1e-980d-872611325771n%40googlegroups.com?utm_medium=email&utm_source=footer>.


SP Ooi

unread,
Aug 13, 2024, 11:37:10 AM8/13/24
to firebird...@googlegroups.com
This is good information.

All of our databases are on Firebird 1.5 platform. Found out that we could backup the database with a transportable option and then restore onto firebird 5.0.1 platform directly. Is this reliable?

Record counts from each table and data seemed to match.

SP
Sent from mobile device


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/v9ctpf%24gua%241%40ciao.gmane.io.

Dimitry Sibiryakov

unread,
Aug 13, 2024, 11:44:05 AM8/13/24
to firebird...@googlegroups.com
SP Ooi wrote 13.08.2024 17:36:
> All of our databases are on Firebird 1.5 platform. Found out that we could
> backup the database with a transportable option and then restore onto firebird
> 5.0.1 platform directly. Is this reliable?

You can be sure that if whole process ended without errors then your data was
copied successfully.
Still your application is not guaranteed to work properly with new server and
new database.

--
WBR, SD.

SP Ooi

unread,
Aug 13, 2024, 11:57:02 AM8/13/24
to firebird...@googlegroups.com
Yes, We will need to upgrade our application for sure, to build with FB 5 libraries.

May run into reserved words issues ...


SP
Sent from mobile device

--
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.

Mark Rotteveel

unread,
Aug 13, 2024, 12:00:13 PM8/13/24
to firebird...@googlegroups.com
On 13/08/2024 17:56, SP Ooi wrote:
> Yes, We will need to upgrade our application for sure, to build with FB
> 5 libraries.
>
> May run into reserved words issues ...

Not only that, there may be breaking changes in statement parsing (there
were a number between 1.5 and 2.0 IIRC), or subtle changes in expression
evaluation (including types returned). You might be using UDFs, which
you should replace with built-in functions, etc.

Mark
--
Mark Rotteveel

SP Ooi

unread,
Aug 13, 2024, 12:05:33 PM8/13/24
to firebird...@googlegroups.com
Thanks for the information.

It is exciting though, after so many years on FB1.5. Our original developer had retired.

We have a lot of database files; more than half a million, no kidding.


SP
Sent from mobile device

--
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.

ja...@jac2.co.uk

unread,
Aug 13, 2024, 1:43:02 PM8/13/24
to firebird...@googlegroups.com

I would be really interested in your journey and experience.  I have a similar job to do, although on a smaller scale.  It felt a bit daunting going from 1.5 to 2.x and dialect 1 to dialect 3 with a lot fewer databases.  What development language are you using as a client?

 

If this isn’t the place to do that, then message me directly  if you are happy to.

 

 

Regards,

Jason Chapman

SP Ooi

unread,
Aug 13, 2024, 2:44:24 PM8/13/24
to firebird...@googlegroups.com
I will be very happy to share it here.

But I have a lot to learn before we get the environment stabilized.

SP
Sent from mobile device

Reply all
Reply to author
Forward
0 new messages