Dump a PostgreSQL database:

[email protected]:~$ pg_dump db_name -v --format=c --file=./db_name.dump

Import the dump to a new PostgreSQL database:

[email protected]:~$ createdb -E UTF8 -T template0 db_new
[email protected]:~$ pg_restore -U user -d db_new ./db_name.dump
[email protected]:~$ psql --command "ALTER DATABASE db_new OWNER TO user;"

PostgreSQL, often basically Postgres, is an object-relational database management method (ORDBMS) obtainable for lots of platforms including Debian , FreeBSD, Solaris, MS Windows & Mac OS X.

It is released under the PostgreSQL License, which is an MIT-style license, & is thus free & open source application. PostgreSQL is developed by the PostgreSQL Global Development Group, consisting of a handful of community volunteers employed & supervised by companies such as Red Hat.

Step1. PostgreSQL Installation:

apt-get install postgresql

Step2. PostgreSQL Configuration:

The main configuration file is located in : /etc/postgresql/8.4/main/postgresql.conf
Fist open the configuration file and make the following changes:

vim /etc/postgresql/8.4/main/postgresql.conf

and remove the “#” form  line:

#password_encryption = on

Optional you can make the PostgreSQL to listen on  any ip address:

Continue Reading…

Page 1 of 11