deployment:postgresql

This is an old revision of the document!


PostgreSQL - Dumping Data

Windows

   cd "\Program Files\PostgreSQL\9.3\bin"
   pg_dumpall -Upostgres > data.bu
   

Linux

   su - postgres
   pg_dumpall  > data.bu
   zip data.zip data.bu
   exit
   

The above will save the data in the folder /var/lib/pgsql

PostgreSQL - Restoring Data

Since you are restoring the whole database you will need to delete the database completely. So please remember to do a back up before you do so. Also, you must stop tomcat.

Windows

   cd "\Program Files\PostgreSQL\9.3\bin"
   psql -Upostgres
   drop database da;
   \q
   unzip data.zip
   psql -Upostgres < data.bu
   

Linux

   su - postgres
   psql
   drop database da;
   \q
   psql < data.bu
   exit
   
/srv/www/htdocs/wiki/data/attic/deployment/postgresql.1427008407.txt.gz · Last modified: 2015/03/22 07:13 by asok