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>
If it doesn't work and yields the error:
Make sure you have installed the heroku gem (note that this is the gem, not the toolbelt).
http://stackoverflow.com/a/9629625/839086