I'm reading the documentation here, and I have a few questions. Just to make sure I'm not misunderstanding what this terminal command is supposed to do.
Question 1:
I have an SQLite .db file on my local computer. With this command, I can convert this db into a mydb.dump
file, which I can then import into Heroku Postgres. Is this intepretation correct? If so, we can move on to my second question.
Question 2:
Attempting to run PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -h localhost -U myuser mydb > mydb.dump
is causing me some issues. From what I can understand, the values I'm supposed to substitute are
mypassword (heroku postgres password)
myuser (I have no idea what's supposed to be here)
mydb (name of db)
mydb.dump (name of dump)
What exactly should go into each of these values, and where can I find them?
The pg_dump
command dumps a PostgreSQL database. It has nothing to do with SQLite.
SQLite and PostgreSQL are very different databases. If you're going to use Postgres in production I strongly recommend using it in development as well. In general, your development environment (and any others, like a staging environment) should be as similar as possible to your production environment.