How to exclude table backup in mydumper

Asked by MF

imho table regex for exclusion isn't working, or I can't find how to do it.

I'm trying
mydumper -v 3 -B dbname -o /tmp -x '^(?!(dbname.user))$'

and nothing dumped (except metadata, with 2 lines: Started dump ... Finished dump).

regex for include works fine
mydumper -v 3 -B dbname -o /tmp -x '^(dbanem.user)$'

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL Data Dumper Edit question
Assignee:
No assignee Edit question
Solved by:
Max Bubenick
Solved:
Last query:
Last reply:
Revision history for this message
Best Max Bubenick (max-bubenick) said :
#1

Hi, this is correct regex for exclusion

-x '^(?!(dbname.user$))'

That will match the exact db.tbl name.

A few more examples:

exlcude two tables

-x '^(?!(dbname.user$|dbname.tbl2$))'

exclude all tables on schema dbname starting with user, i.e. user, user2 user3

-x '^(?!(dbname.user))'

exclude all dbname schema

-x '^(?!(dbname))'

Hope that helps.
- Max

Revision history for this message
MF (fuxa-kos) said :
#2

This Solved My Problem

Revision history for this message
MF (fuxa-kos) said :
#3

Thanks Max Bubenick, that solved my question.