This is the command I used to export the entire Postgres database:
$PGUSER=my_username PGPASSWORD=my_password heroku pg:pull DATABASE_URL my- application-name`
Maybe there is a way to exclude a table, or specify a list of tables to include?
You can try this:
$ PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -T *table you want to exclude* -h localhost -U myuser mydb> mydb.dump
I want to export my Heroku application Postgres database, but I want to exclude a table. Is this possible?
This is the command I used to export the entire Postgres database:
$PGUSER=my_username PGPASSWORD=my_password heroku pg:pull DATABASE_URL my- application-name`
Maybe there is a way to exclude a table, or specify a list of tables to include?
In ordinary pg dump commands, you can use the -t option to specify the tables to be included, and use the -T option to exclude the tables.
< /p>
You can try this:
$ PGPASSWORD=mypassword pg_dump -Fc --no-acl --no-owner -T *table you want to exclude* -h localhost -U myuser mydb> mydb.dump