machbarmacher/gdpr-dump

Accept gdpr-skip-tables argument

Opened this issue · 3 comments

When dumping a database we might not want to copy across or sanitize all tables (ie: cache tables). I suggest accepting this parametre (and/or in the configuration files) to be able to just create those tables but don't transfer any data.

Suggested:
"gdpr-skip-tables":["tableName1","tableName2","tableName3"]

@fjgarlin - I think we're going to need a different name for this, to me skipping tables means actually skipping the table entirely. It seems that mysqldump-php actually supports us passing through a list of tables for which skip table table -- namely the "no-data" parameter.
Here it's slightly more flexible than mysqldump itself, since mysqldump's "no-data" option seems to be an all-or-nothing affair.
So it makes sense for us to call it something else - but maybe specifying that it's skipping the data rather than the tables themselves.
Something like "gdpr-skip-table-data".
What I'll do, though, is write up a PR that uses your suggestion for now, and we can chat about it here.

Hey @bomoko, happy to change it to whatever makes sense. Do the implementation that you believe is right and I'll adapt the patch as required. Thanks!

Hello,

Maybe can be useful to support also pattern in skip tables like "no-data":["cache_%","apachesolr_%"]