Docker Community Forums

Share and learn in the Docker community.

How to upgrade docker postgresql 9.5 into 9.6


(120595) #1

Please help me.
How do i upgrade docker postgres into 9.6 without losing my current data on ubuntu 14?

(Siju Oommen George) #2

This is just one of the ways to achieve it.

  1. Take a Database dump from the current database.
  2. Install postgres 9.6 from Docker store

    $ sudo docker run postgres:9.6.5
  3. Restore the dump to the new 9.6.5 container.

Hope this helps :slight_smile:


(120595) #3

thanks george. but i still got error.
There’s some error while i try to pg_dum dbname >outfile even i try it on root or
on postgresql.

(Junius) #4

try pg_dumpall? follow pg 9.6 upgrade doc:

(120595) #5

i still got this error. how to solve this?

(Junius) #6

looks you need to install postgresql-client-9.5. you could attach to the container, apt-get update, then install postgresql-client