Source:
http://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku/
https://devcenter.heroku.com/articles/taps#
gem install heroku
gem install taps
# Export database from heroku
heroku db:pull --app <app-name> # This will replace the data specified in database.yml (most often development database)
heroku db:pull sqlite://<path> --app <app-name> # Don't forget to add the extra "/" if you're using an absolut path
# Import database to heroku
heroku db:push --app <app-name>
http://stackoverflow.com/a/8283931