Last Updated: December 26, 2018
·
2.508K
· beanieboi

upgrading postgres from 9.1 to 9.2

I tested this on ubuntu (12.04 at the moment of writing)
Install Postgres 9.2 from https://launchpad.net/~pitti/+archive/postgresql

drop the the empty cluster which gets created during the setup

pg_dropcluster --stop 9.2 main

create a backup of your current cluster

rsync -a /var/lib/postgresql/9.1 /var/lib/postgresql/9.1.backup

upgrade the the old 9.1 cluster

pg_upgradecluster 9.1 main /var/lib/postgresql/9.2 

if everything is perfect, drop the old cluster

pg_dropcluster 9.1 main 

1 Response
Add your response

thx, saved my day!

over 1 year ago ·