Search code examples
database-backupspercona

how to ignore backing up certain tables with innobackupex


I am using innobackupex to back up my database but I need to ignore a few tables. is there an --ignore-tables option? I can't seem to find any examples


Solution

  • Update (thanks to Shlomi's comment): Percona in XtraBackup 2.3, there's an option --tables-exclude

    https://www.percona.com/doc/percona-xtrabackup/2.3/xtrabackup_bin/xbk_option_reference.html says:

    --tables-exclude=name

    Filtering by regexp for table names. Operates the same way as xtrabackup --tables, but matched names are excluded from backup. Note that this option has a higher priority than xtrabackup --tables.


    Before XtraBackup version 2.3, there is no option in xtrabackup or innobackupex to ignore certain tables while backing up the rest.

    You could use --include and give a regular expression that matches all tables except the ones you want to ignore.

    For example, you could put the tables to ignore into a separate database, and then back up all the databases except for that one.