How do I backup a pgsql/PostgreSQL database?


To get a list of all databases on PostgreSQL su to the postgres user:

 

su - postgres

 

Once you have switched to the postgres user simply issue the following command to backup the database.

 

pg_dump <database> > <databasebackup.sql>

You should now have a complete backup of the database content.

Tags: backup, database, pgsql, postgres, postgresql
Last update:
2014-12-16 21:45
Author:
Chris Burton
Revision:
1.0
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.

Records in this category

Tags