Last active
January 27, 2016 23:46
-
-
Save tuannvm/fd9906a2e36bb74033f3 to your computer and use it in GitHub Desktop.
postgre 9.1 to 9.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#### For Dev1 first #### | |
#### announce an 30 mins maintenance #### | |
####backup postgre 9.1 db (about 10 mins)######## | |
su - postgres | |
pg_dumpall > <backup-db>.sql | |
####install postgre 9.4 (about 1 mins)#### | |
wget http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-2.noarch.rpm | |
rpm -ivh pgdg-centos94-9.4-2.noarch.rpm | |
yum install postgresql94-server.x86_64 | |
/etc/init.d/postgresql-9.1 stop | |
yum remove postgresql91* | |
#### start & restore db to postgre 9.4 (about 10 mins)#### | |
/etc/init.d/postgresql-9.4 restart | |
service postgresql-9.4 initdb | |
su - postgres | |
psql -f < <backup-db>.sql | |
#### test data intergrity (about 5 mins)#### | |
#### all done. should publish now #### |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment