<div dir="ltr">I am in the midst of a similar migration right now, though I am going from 9.3 to 9.5, and my OS is CentOS 6.  I too have had some troubles, and could not find a reference that actually worked for me on CentOS, although I had succeeded with a nearly identical migration on Ubuntu!  In the end, the stumbling block was a change in characer encoding from 9.3 to 9.5.  Once, I realized how to manage that,  I used "pg_dump" and "<a href="http://postgis_restore.pl">postgis_restore.pl</a>" and it seemed to work fine (I am, as I said, still doing it and testing it).  For me, the steps were as follows:<div><br></div><div>1. Install 9.5 along side 9.3, setting 9.5 to listen to port 5434.</div><div><pre style="padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);background-color:rgb(249,249,249);line-height:1.1em;white-space:pre-wrap;word-wrap:break-word"># Postgres repo needs to be updated
sudo yum localinstall <a href="https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm">https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-3.noarch.rpm</a>
# The old repo was: <a href="http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpm">http://yum.postgresql.org/9.5/redhat/rhel-6-x86_64/pgdg-centos95-9.5-2.noarch.rpm</a>
sudo yum install postgresql95-server
sudo yum install postgresql95-devel
sudo yum install postgresql95-contrib
# install postgis
sudo yum install postgresql95-devel
sudo yum install postgresql95-contrib

# shut it off so if we get interupted it doesn't over-run the 9.3 install
sudo chkconfig postgresql-9.5 off
sudo mkdir /data/postgres/9.5
sudo chown postgres /data/postgres/9.5
sudo su - postgres
# initialize the cluster
/usr/pgsql-9.5/bin/initdb /data/postgres/9.5/

# create users drupal on new clusters
createuser -p 5434 normaluser
createuser -s -p 5434 superuser

# turn it on if needed
/usr/pgsql-9.5/bin/pg_ctl -D /data/postgres/9.5/ start -l logfile.9.5</pre></div><div>2. Wrote a script called "<a href="http://migrate9.3to9.5.sh">migrate9.3to9.5.sh</a>" to loop through my databases one by one.</div><div><pre style="padding:1em;border:1px dashed rgb(47,111,171);color:rgb(0,0,0);background-color:rgb(249,249,249);line-height:1.1em;white-space:pre-wrap;word-wrap:break-word">#!/bin/sh
# <a href="http://migrate9.3to9.5.sh">migrate9.3to9.5.sh</a>
dbadmin="superuser"
dbuser="normaluser"
dbs="gistest"
host1="localhost"
host2="localhost"
port1=5432
port2=5434
postgis_restore2="/usr/pgsql-9.5/share/contrib/postgis-2.2/<a href="http://postgis_restore.pl">postgis_restore.pl</a>"


for db in $dbs; do
  # use -E because default postgres encoding changes somewhere from 9.3 to 9.5 (in centos anyhow)
  pg_dump -h localhost -p 5432 -U $dbadmin -E SQL_ASCII -Fc -b -v -f "/tmp/$db.backup" $db
  createdb -h $host2 -p $port2 $db
  echo "create extension postgis;" | psql -U $dbadmin -h $host2 -p $port2 $db
  perl $postgis_restore2 "/tmp/$db.backup" | psql -h $host2 -p $port2 $db 2> errors.txt
  echo "grant all on database \"$db\"to $dbuser" | psql $dbname -U $dbadmin -p $port2 -h $host2
  echo "grant all on all tables in schema public to $dbuser" | psql $dbname -U $dbadmin -p $port2 -h $host2
done
</pre></div><div>3. Change the 9.5 port back to 5432 after I am satisfied that it worked well.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 31, 2016 at 7:06 PM, Max Pyziur <span dir="ltr"><<a href="mailto:pyz@brama.com" target="_blank">pyz@brama.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Greetings,<br>
<br>
I have a series of machines on which I run Fedora along with PostgreSQL & PostGIS (two laptops & a desktop). I've begun upgrading these machines starting with the least used/critical one.<br>
<br>
I've run into what seems to be typical w/in the PostgreSQL/PostGIS community as expressed in the subject line: there are several challenges in upgrading to get to PSQL 9.5.4/PostGIS 2.2.1.<br>
<br>
Google returns a few pages where there are explanations on how to upgrade, along with a Bugzilla page.<br>
<br>
If possible, could someone please recommend the authoritative one of these or offer general guidance?<br>
<br>
Much thanks.<span class="HOEnZb"><font color="#888888"><br>
<br>
Max Pyziur<br>
<a href="mailto:pyz@brama.com" target="_blank">pyz@brama.com</a><br>
______________________________<wbr>_________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/mailman<wbr>/listinfo/postgis-users</a></font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">--<br>Robert W. Burgholzer<br> 'Making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity.'  - Charles Mingus<div>Athletics: <a href="http://athleticalgorithm.wordpress.com/" target="_blank">http://athleticalgorithm.wordpress.com/</a> <br></div><div>Science: <a href="http://robertwb.wordpress.com/" target="_blank">http://robertwb.wordpress.com/</a></div><div>Wine: <a href="http://reesvineyard.wordpress.com/" target="_blank">http://reesvineyard.wordpress.com/</a></div></div></div>
</div>