August 29, 2019 By Phil Alger 5 min read

PostgreSQL version 9.4.x is coming to an end on February 13, 2020.

That means current IBM Cloud Databases users will no longer be able to provision PostgreSQL 9.4 instances. 

By February 20, 2020, all Databases for PostgreSQL instances on version 9.4 that are still active will be disabled. Users are expected to be either on PostgreSQL version 9.6 or get the latest preferred version of Databases for PostgreSQL with all the great features that have been added in versions 10 and 11.  

We reserve the right to end support at our discretion if a security vulnerability is discovered during the window between February 13th, 2020 and February 20th, 2020. This means that we may need to shut down those PostgreSQL deployments and remove them from our system since they would not meet compliance regulations.

Impact to Databases for PostgreSQL users 

By the end of 2019, we will introduce a native, major version upgrade feature that does not require pg_dump. You may want to wait until that functionality is released before migrating to a new PostgreSQL version. We’ll offer guidance once this feature is available. 

In the interim, it’s recommended that users begin testing Databases for PostgreSQL 9.5, 9.6, 10, or 11.

Impact to Compose for PostgreSQL users

Over the next few months, we will release a migration path from Compose for PostgreSQL 9.4 to Databases for PostgreSQL 9.4 and up. Compose for PostgreSQL users should consider upgrading to Compose for PostgreSQL 9.4 to 9.6 before migrating to Databases for PostgreSQL if you want a limited downtime migration solution or have a large database, which would be prohibitive to migrate with the dump and restore method.

Migrating your data

In the meantime, if you want to get started on the migration process, we have some guidance on how to dump and restore your PostgreSQL database into a new Databases for PostgreSQL version.

To start, you’ll need to provision a new PostgreSQL deployment. From the IBM Cloud dashboard, click the blue Create Resource button. 

Then, search for “Databases for PostgreSQL” and click on the box.

Provision a new Databases for PostgreSQL database. The preferred version will automatically be selected by default. You have the option of scaling the database’s memory and disk size beforehand. IBM Cloud Databases doesn’t autoscale, so we recommend allocating the appropriate disk and RAM that’s at least the same as your PostgreSQL 9.4 deployment.

 After that, click Create and you’ll have a new IBM Cloud Databases for PostgreSQL deployment. 

Using pg_dump or a tool like pgAdmin, you’ll need to migrate your data from your current PostgreSQL 9.4 deployment to the new one. For guidance on pg_dump for version 9.4 see the PostgreSQL documentation.

A basic example of how to use pg_dump for your terminal is the following: 

> PGSSLROOTCERT=/path/to/ca_cert pg_dump --port=99999 --user=<user> --dbname=my_database --password -f allMyData.sql

This command will place all the PostgreSQL tables, schemas, functions, etc. from the my_database database into a SQL file called allMyData.sql. Once that file has been created, make sure that you have set up all the users and roles from your old PostgreSQL deployment into your new one. Then, simply restore it into your new deployment as follows:

> PGSSLROOTCERT=/path/to/ca_cert psql " port=88888 user=<user> dbname=new_database password=<password> sslmode=verify-full" -f allMyData.sql

After restoring your data, run some tests to make sure that it has been restored properly into your new database. 

Migrate from a Backup

You also have the ability to migrate your PostgreSQL data through a backup. From the IBM Cloud UI, just select your database and click on the Backups tab. From there, you have three options available to you: point-in-time, automatic, or on-demand. 

For point-in-time backups, you can restore at the latest available point or choose a specific time within the last seven days from which to create a new deployment.

With automatic, you can select the latest backup we’ve created for you to create a new deployment.

Or, you can create an on-demand backup and restore that to a new deployment.

n this example, let’s create an on-demand backup of the database so that we have a backup of the latest data. Select the On-demand tab, then click on the Back up now button to start a backup. 

Once the backup has been initiated, you will see just now appear in the panel. If you click on that, it will give you the backup ID number only, until the backup has finished being created.

If you click on the Overview tab, you can see the backup creation progress.

When the backup is finished, it will appear with a green check mark and the time when it was taken. Select the arrow on the backup you just created. This will open a drop-down panel with information on how to restore the backup into a new PostgreSQL deployment.

You have two options to restore into a new deployment—from the UI or by using the IBM Cloud CLI. The IBM Cloud CLI command to restore your backup into a new database deployment is given to you at the bottom of that panel. 

ibmcloud resource service-instance-create SERVICE_INSTANCE_NAME databases-for-postgresql standard us-south -p '{"backup_id":"<backup_id_number"}'

All you need to do is supply a new name for your deployment where it says SERVICE_INSTANCE_NAME, us-south for any region you want your new deployment to reside in, then run that command from the terminal. Note that the command will restore your backup to the preferred version of PostgreSQL on IBM Cloud. 

If you wanted to restore right from the UI, you can do that as well. Click on the blue Restore button at the top of the panel shown in the image above. Once that’s clicked, you’ll be forwarded to another screen which will give you the option of naming your deployment, as well as selecting a version:

This screen will provide you with an arbitrary name (which you can change), and will allow you to select the version of PostgreSQL you want and the region you want the database to reside in. Once you’ve filled out the form, click on Restore and you’ll have a new deployment with the restored data from the backup.

Moving forward

If you have any questions about migrating your data to a new IBM Cloud Databases for PostgreSQL deployment, please reach out to our support team who can guide you through the process.

More from Announcements

IBM Hybrid Cloud Mesh and Red Hat Service Interconnect: A new era of app-centric connectivity 

2 min read - To meet customer demands, applications are expected to be performing at their best at all times. Simultaneously, applications need to be flexible and cost effective, and therefore supported by an underlying infrastructure that is equally reliant, performant and secure as the applications themselves.   Easier said than done. According to EMA's 2024 Network Management Megatrends report only 42% of responding IT professionals would rate their network operations as successful.   In this era of hyper-distributed infrastructure where our users, apps, and data…

IBM named a Leader in Gartner Magic Quadrant for SIEM, for the 14th consecutive time

3 min read - Security operations is getting more complex and inefficient with too many tools, too much data and simply too much to do. According to a study done by IBM, SOC team members are only able to handle half of the alerts that they should be reviewing in a typical workday. This potentially leads to missing the important alerts that are critical to an organization's security. Thus, choosing the right SIEM solution can be transformative for security teams, helping them manage alerts…

IBM and MuleSoft expand global relationship to accelerate modernization on IBM Power 

2 min read - As companies undergo digital transformation, they rely on APIs as the backbone for providing new services and customer experiences. While APIs can simplify application development and deliver integrated solutions, IT shops must have a robust solution to effectively manage and govern them to ensure that response times and costs are kept low for all applications. Many customers use Salesforce’s MuleSoft, named a leader by Gartner® in full lifecycle API management for seven consecutive times, to manage and secure APIs across…

IBM Newsletters

Get our newsletters and topic updates that deliver the latest thought leadership and insights on emerging trends.
Subscribe now More newsletters