This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
aws:postgresql [2014/07/29 10:26] asok |
aws:postgresql [2015/07/08 05:34] (current) asok |
||
---|---|---|---|
Line 1: | Line 1: | ||
=====PostgrSQL - Direct Upgrade to Version 9.3===== | =====PostgrSQL - Direct Upgrade to Version 9.3===== | ||
- | * Back up data using pg_dumpall | + | * Stop tomcat and back up data using pg_dumpall |
<code> | <code> | ||
+ | service tomcat6 stop | ||
su - postgres | su - postgres | ||
pg_dumpall > mydata.bu | pg_dumpall > mydata.bu | ||
exit | exit | ||
- | mv /var/lib/pgsql/mydata.bu . | + | mv /var/lib/pgsql/mydata.bu /root |
</code> | </code> | ||
* Go to yast and uninstall postgres | * Go to yast and uninstall postgres | ||
- | * Download PostgreSQL installer from EnterpriseDB | + | * Download PostgreSQL installer from EnterpriseDB and install: |
<code> | <code> | ||
Line 18: | Line 18: | ||
chmod u+x postgresql-9.3.5-1-linux-x64.run | chmod u+x postgresql-9.3.5-1-linux-x64.run | ||
./postgresql-9.3.5-1-linux-x64.run | ./postgresql-9.3.5-1-linux-x64.run | ||
+ | </code> | ||
+ | * Rename service name | ||
+ | <code> | ||
+ | mv /etc/init.d/postgresql-9.3 /etc/init.d/postgresql | ||
+ | </code> | ||
+ | * Using yast set run level 3 & 5 for automatic startup. | ||
+ | * Go to bin folder and restore database from backup. | ||
+ | <code> | ||
+ | cd /opt/PostgreSQL/9.3/bin | ||
+ | psql -Upostgres < /root/mydata.bu | ||
+ | </code> | ||
+ | * Restart postgres and start tomcat | ||
+ | <code> | ||
+ | service postgresql restart | ||
+ | service tomcat6 start | ||
+ | </code> | ||
+ | * Create Symbolic Link to ensure back up scripts will work | ||
+ | <code> | ||
+ | ln -s /opt/PostgreSQL/9.3 /var/lib/pgsql | ||
</code> | </code> |