PostgreSQL – Export Heroku Postgres database, but exclude table

I want to export the Postgres database of my Heroku application, 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 table.

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

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 718 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.