Postgresql Upgrade in lower to higer(9.3 to 9.5)
1.lower version
pg_dumpall >full_dmp
2.to copy the dump higher version (9.3 to 9.5)
scp full_dup root@<higer_version>:/root
Note:- Before stop higher version take one full backup
3.stop the higer version database..
/etc/init.d/postgres 9.5 stop
4.mv the old cluster
mv /opt/postgres/9.5/data /opt/postgres/9.5/data.old
5.create one directory and change the postgres permission
mkdir /9.5_new_data
chown -R postgres:postgres /9.5_new_data
chmod 700 data
6.go to postgres user and create new cluster
su - postgres
cd /bin
./initdb -D /9.5_new_data
7.same in bin to get postmaster.pid
./postgres -D /9.5_new_data
8.retore the dump..
psql -f /Backup/dumpfile.dmp
pg_dumpall >full_dmp
2.to copy the dump higher version (9.3 to 9.5)
scp full_dup root@<higer_version>:/root
Note:- Before stop higher version take one full backup
3.stop the higer version database..
/etc/init.d/postgres 9.5 stop
4.mv the old cluster
mv /opt/postgres/9.5/data /opt/postgres/9.5/data.old
5.create one directory and change the postgres permission
mkdir /9.5_new_data
chown -R postgres:postgres /9.5_new_data
chmod 700 data
6.go to postgres user and create new cluster
su - postgres
cd /bin
./initdb -D /9.5_new_data
7.same in bin to get postmaster.pid
./postgres -D /9.5_new_data
8.retore the dump..
psql -f /Backup/dumpfile.dmp
Comments
Post a Comment