Creating a database dump for specific tables and entries Postgres

Right from the manual: “Multiple tables can be selected by writing multiple -t switches

So you need to list all of your tables

pg_dump --column-inserts -a -t zones_seq -t interway -t table_3 ... > /tmp/zones_seq.sql  

Note that if you have several table with the same prefix (or suffix) you can also use wildcards to select them with the -t parameter:

Also, the table parameter is interpreted as a pattern according to the same rules used by psql’s \d commands

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)