I'm trying to get the most up-to-date production data from my Heroku app restored into my development database on localhost. I backed up my production database with
heroku pg:backups capture --app <my-app-name>
and downloaded it using
curl -o latest.dump `heroku pg:backups public-url`
and it sounds like I need to convert it from PostgreSQL to Sqlite3 possibly using something like the process here http://manuelvanrijn.nl/blog/2012/01/18/convert-postgresql-to-sqlite/, but I'm not 100% on that. Is there a better way to get the binary latest.dump
data restored into my development.sqlite3
?
Edit: it sounds like all I need to do is set up Postgres on my machine, reconfigure my RoR app settings to use Postgres, and restore the production db with pg_restore
. I'm a little confused though because of my database.yml file:
# SQLite version 3.x
# gem install sqlite3
#
# Ensure the SQLite 3 gem is defined in your Gemfile
# gem 'sqlite3'
#
default: &default
adapter: sqlite3
pool: 5
timeout: 5000
development:
<<: *default
database: db/development.sqlite3
# Warning: The database defined as "test" will be erased and
# re-generated from your development database when you run "rake".
# Do not set this db to the same as development or production.
test:
<<: *default
database: db/test.sqlite3
production:
<<: *default
database: db/production.sqlite3
Is heroku ignoring the production settings and using Postgres anyways?