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

blog comments powered by Disqus

Previous post:

Next post: