I am currently looking for a software/web development job preferably as a Rails-based developer.
Please email me at weston@westonganger.com. Thanks in advance for any leads!

Backup, Clear, And Restore A Postgresql Database For Rails

Posted by Weston Ganger

First Backup your database:

pg_dump dbname > outfile

To clear your database:

dropdb dbname
createdb dbname

To restore database 

psql dbname < infile

Then run your migrations

rake db:migrate RAILS_ENV=development

Article Topic:Software Development - Linux

Date:June 18, 2014

Recommended Posts