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

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
I have Firebird 2.5 running locally
database.bkp (file to restore, Firebid 2.5)
apt get install firebird3.0-utils
I executed gbak to restore the database, fdb generated successfully
But I cannot open the file "structure found 12.1, support 11.2."

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

Related

Azure Postgres Single server version upgrade

Azure Postgres Single server version is 11. Is it possible to upgrade it to 13+ version using dump and restore as mentioned here:
https://learn.microsoft.com/en-us/azure/postgresql/how-to-upgrade-using-dump-and-restore
It should still remain Single Server.
Yes, you can.
The document you shared is Microsoft's official and therefore there is no doubt that you can upgrade it to any higher version using dump and restore.
Just take care of the below mentioned points:
You can upgrade your PostgreSQL server deployed in Azure Database for PostgreSQL by migrating your databases to a higher major version server using following methods.
Offline method using PostgreSQL pg_dump and pg_restore which incurs downtime for migrating the data.
Online method using Database Migration Service (DMS). This method provides a reduced downtime migration and keeps the target database in-sync with the source and you can choose when to cut-over. However, there are few prerequisites and restrictions to be addressed for using DMS.
The following table provides some recommendations based on database sizes and scenarios.
Choose the right approach based on your database configuration and it should be done without any issue.
To upgrade using pg_dump and pg_restore, you can refer Migrate your PostgreSQL database by using dump and restore.
It is not possible.
In the document, prerequisites states:
A source PostgreSQL database server running a lower version of the
engine that you want to upgrade. A target PostgreSQL database server
with the desired major version Azure Database for PostgreSQL server -
Single Server or Azure Database for PostgreSQL - Flexible Server.
The question asks about upgrading target.

AWS RDS PostgreSQL Upgrade from 9.6.22 to 10.17

Good day. I just finished upgrading my AWS RDS database engine from 9.6.22 to 10.17. I used these steps to make the upgrade using the AWS Console:
Create snapshot of target database to upgrade
Restore snapshot
Upgrade the restored snapshot's (which is now a new instance) DB Engine version.
After I did all of this, everything seems fine but when I access the database, this warning message appears
WARNING: psql major version 9.6, server major version 10.
Some psql features might not work.
I did not continue on my testing because I want to know what is the meaning of this first. Because I am fairly new in AWS as a whole. Thanks!
The meaning is that just because you are connecting to an upgraded database on some machine run by Amazon, the PostgreSQL installation on your local machine was not magically updated. psql from version 9.6 doesn't know what metadata tables were changed in v10, what features were removed and so on.
It would be a good idea to install a more recent version of PostgreSQL on your machine. By the way, upgrading to v10 was not the smartest move, as that version will go out of support in less than a year. You should upgrade to the latest version that your service provider offers.
The client program psql you are using to connect to the database is from an older version than the database it is connecting to. Some of the introspection features might not work. For example, psql from 9.6 won't know how to do tab completion for commands that were added to the server after 9.6.
This is generally not a major problem for psql (unless the server wants to use SCRAM authentication), but for optimal experience it would be good to install a newer client. Other tools like pg_dimp might not with at all against a server newer than they are.

Can you upgrade Postresql-server directly from 9.2 to 9.6?

Can you upgrade Postresql-server directly from 9.2 to 9.6? (Running on RHEL 7)
yes:
https://www.postgresql.org/docs/9.6/static/pgupgrade.html
pg_upgrade supports upgrades from 8.4.X and later to the current major
release of PostgreSQL, including snapshot and alpha releases.
https://www.postgresql.org/docs/9.6/static/app-pgdump.html
Because pg_dump is used to transfer data to newer versions of
PostgreSQL, the output of pg_dump can be expected to load into
PostgreSQL server versions newer than pg_dump's version. pg_dump can
also dump from PostgreSQL servers older than its own version.
(Currently, servers back to version 7.0 are supported.) However,
pg_dump cannot dump from PostgreSQL servers newer than its own major
version; it will refuse to even try, rather than risk making an
invalid dump.
ephasis mine

Enable stored procedures after database downgrade

I've recently upgraded/downgraded a database as stated on this link:
https://www-304.ibm.com/support/docview.wss?uid=swg21351101
Specifically, it was from db2 9.7.5 (32bit) to 9.7.6 (64bit) to 9.7.0 (32bit)
(license issues, bear with me). Now, after successfully restoring my backup to 9.7.0, I can't run any stored procedures.
On resolving the problem, It says:
Contact your DBAdmins and let them verify if the required stored
procedures are enabled on the DB2 database. The required stored
procedures are: JAVA Database Connectivity (JDBC) Open Database
Connectivity (ODBC)
Then I'm at a loss. How do I enable a procedure?
After upgrading or downgrading your DB2 instance you need to also upgrade or downgrade all databases in that instance. You do that by running the UPGRADE DATABASE command, as explained in the manual, which will create catalog tables, views, and other system objects appropriate for the version and fix pack level.

Using pg_admin III and PostgreSQL 8.1 (both test and development)

I want to backup Development and restore it in test and vice-versa.
So when I do a backup of the db (in PGAdmin III), it backs it up. But
when I restore it, all primary key information is gone and no data is
in the tables.
Any help would be much appreciated. Thanks.
pgAdmin uses the client programs pg_dump for making backups and pg_restore for restoring (it's only a GUI). Try to dump and to restore with these programs directly and see if you get any errors or warnings.
Offtopic: Support for version 8.1 ends this year, you should upgrade to a newer version.