1

I have an app using Firebird 2.5.9. We're going to be releasing a major new version of the app, and I want to migrate to FB 5.0. The database schema has changed dramatically between old and new app versions, and I've written a utility to pump the data from old-schema v2.5 database to new-schema v2.5 database.

I want to make sure I understand the process of upgrading an existing installation; specifically, using gbak to convert the 2.5 database to 5.0. Can the gbak from 5.0 back up a 2.5 database and then restore it to a 5.0 database? Or do I need to back up with gbak 2.5 first, then change Firebird versions and restore using gbak 5.0? This will determine where in the process I uninstall Firebird 2.5.9 and install Firebird 5.0.2.

1
  • You can also install multiple Firebird versions side-by-side, you will just need to make sure they use different port numbers (RemoteServicePort setting) and IPC name (IpcName setting). As an aside, Firebird 5.0.3 was just released, and you may want to install that. Commented Jul 18 at 19:05

1 Answer 1

1

You need to make the backup under Firebird 2.5, and you need to use the Firebird 2.5 gbak to do it. Then, restore it under Firebird 5.0 with the Firebird 5.0 gbak.

The Firebird 5.0 gbak cannot backup a Firebird 2.5 database. By default (when using a filename only), it connects through its embedded engine (engine13.dll), which doesn't understand Firebird 2.5 databases (ODS 11.2), and attempts to backup remotely to a Firebird 2.5 server (e.g. hostname:filename) will also fail as it will try to use features not available on Firebird 2.5. You can use the service manager option (-se localhost:service_mgr), but then you're only using the Firebird 5.0 gbak to ask the Firebird 2.5 server to do the backup using its own internal gbak, so then you're effectively still using the Firebird 2.5 gbak.

In short:

  • Backup from Firebird 2.5 with Firebird 2.5 gbak
  • Restore under Firebird 5.0 with Firebird 5.0 gbak

Alternatively, create the new database structure on Firebird 5.0, and pump the data from the old Firebird 2.5 database to the new Firebird 5.0 database.

Sign up to request clarification or add additional context in comments.

3 Comments

With both FB versions installed (2.5.9 running as service on port 3050, 5.0.3 running as application on port 3051), when I try to use gbak 2.5.9 to back up the existing FDB, I get a "Unknown ISC error 335545106" immediately on gbak startup. Must I back up the existing FDB before installing 5.0.3?
OK, FB 5.0 cannot be running during the backup, and 2.5.9 can't be running during the restore.
@SteveSneed It should be possible for it to be running, but then you do need to have configured different IpcName and RemoteServicePort for one or the other (and if you change the Firebird 2.5 config, then you need to use the gbak from the same installation directory as the server). Otherwise, I'd recommend asking on firebird-support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.