rap2hpoutre / pg-anonymizer

Dump anonymized PostgreSQL database with a NodeJS CLI
https://raph.site
MIT License
225 stars 31 forks source link

Excluding Tables #23

Open nsaud01 opened 2 years ago

nsaud01 commented 2 years ago

Is it possible to exclude certain tables from being included in the dump?

imreACTmd commented 2 years ago

Not possible in the current release.

rap2hpoutre commented 2 years ago

Hi @nsaud01 ! Thank you for your suggestion. I keep your issue open since it could be considered an interesting feature for a future release.

stevenmasci commented 2 years ago

This is now possible thanks to https://github.com/rap2hpoutre/pg-anonymizer/pull/26

Just append -T table_name to exclude the table from the dump.

FlyCodeine commented 1 year ago

How do I exclude multiple tables? I tried separating them with a comma, but it threw a pg_dump command error: pg_dump:

jackall3n commented 1 year ago

How do I exclude multiple tables? I tried separating them with a comma, but it threw a pg_dump command error: pg_dump:

You can send multiple arguments: pg_dump [db] -T [table1] -T [table2]