User Tools

Site Tools


aws:postgresql

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
aws:postgresql [2014/07/29 09:58]
asok created
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>​
-su - postgres +    service tomcat6 stop 
-pg_dumpall > mydata.bu +    ​su - postgres 
-exit +    pg_dumpall > mydata.bu 
-mv /​var/​lib/​pgsql/​mydata.bu ​+    exit 
 +    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 and install: 
 + 
 +<​code>​ 
 +    cd /var/lib 
 +    wget http://​get.enterprisedb.com/​postgresql/​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 
 +</​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>​
/srv/www/htdocs/wiki/data/attic/aws/postgresql.1406627919.txt.gz · Last modified: 2014/07/29 09:58 by asok