How to upgrade docker postgresql 9.5 into 9.6

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

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:


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.

try pg_dumpall? follow pg 9.6 upgrade doc:

i still got this error. how to solve this?

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