PostgreSQL – Dump and Restore

by Lalit Kapoor on 2008-06-232008-06-23T20:24:18ZY-m-d">June 23, 20082008-06-23T20:24:18ZF j, Y

To dump data from a postgreSQL database you can use the pg_dump command as follows

pg_dump database > file.sql

 

To restore that data you can execute the following command

psql -d database -f file.sql -U db_username

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: