Diego Alves
Diego Alves

Reputation: 2677

gbak installed through firebird3.0-utils restoring a backup gives error when trying to open it

I have a backup file. I did apt-get install firebird3.0-utils to get gbak. I am restored a database that is Firebird 2.5 and I am also running Firebird 2.5 locally. When I try to open the restored database, I get an error "structure found 12.1, support 11.2."

Put it another way

  1. I have Firebird 2.5 running locally
  2. database.bkp (file to restore, Firebid 2.5)
  3. apt get install firebird3.0-utils
  4. I executed gbak to restore the database, fdb generated successfully
  5. But I cannot open the file "structure found 12.1, support 11.2."

Upvotes: 0

Views: 667

Answers (1)

Mark Rotteveel
Mark Rotteveel

Reputation: 109169

When you restored the database using a Firebird 3.0 gbak, it restored the database in Firebird 3.0 format (ODS 12.1 in your case), and Firebird 2.5 cannot read that ODS format (it supports versions 10 - 11.2). You need to restore using a Firebird 2.5 gbak, or upgrade to Firebird 3.0.

You can also use the service manager to restore the database using your Firebird server itself. The gbak tool allows you to do this type of restore through the service manager, see Remote Backups & Restores in the gbak documentation.

Other alternatives are using tools that utilize the service manager (e.g. FlameRobin, fbsvcmgr, and others), or libraries that provide programmatic access to this (e.g. Jaybird's FBBackupManager, FirebirdSql.Data.FirebirdClient's FbBackup and others).

Upvotes: 1

Related Questions