# Option --tables-exclude does not behavior as expected

**URL:** <https://forums.percona.com/t/option-tables-exclude-does-not-behavior-as-expected/5982>\
**Category:** Percona XtraBackup\
**Created:** [November 7, 2017, 4:13am UTC](https://forums.percona.com/t/option-tables-exclude-does-not-behavior-as-expected/5982 "2017-11-07T04:13:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lujinke](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lujinke](https://forums.percona.com/u/lujinke)\
**Post date:** [November 7, 2017, 4:13am UTC](https://forums.percona.com/t/option-tables-exclude-does-not-behavior-as-expected/5982/1 "2017-11-07T04:13:36Z")

</div>

Recently I found the --tables-exclude option does not behavior as expected.  
The backup command i used:  
innobackupex --defaults-file=/usr/local/mysql-5.7.12/my.cnf --user=root --host=localhost --socket=/var/lib/mysql/mysql1.sock --password=root --no-timestamp --tables-exclude=test.t backup

There are three tables in database test,e.g. t,t2 and t3, i want to exclude table t from the backup, but i found innobackupex excludes all of the three tables.  
Does --tables-exclude always treat the option value as regex that if the table in database test contains char ‘t’ and that table will be excluded?

innobackupex version:  
innobackupex version 2.4.8 Linux (x86\_64) (revision id: 97330f7)  
MySQL version: 5.7.12

Feel free to response,thanks!

---

<div class="post-metadata">

**Author:** ![lujinke](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@lujinke](https://forums.percona.com/u/lujinke)\
**Post date:** [November 7, 2017, 8:48pm UTC](https://forums.percona.com/t/option-tables-exclude-does-not-behavior-as-expected/5982/2 "2017-11-07T20:48:48Z")

</div>

Hi, i found i should use --databases-exclude option instead:  
–databases-exclude=test.t does fulfill my demand though it’s a little weird.
