Search This Blog

Thursday, November 22, 2018

MySQL mysqlbackup partial backup example

In the below command all the tables from database i88ca are exclued:
# ./mysqlbackup --user root --socket=/tmp/mysql.sock  --with-timestamp --backup-dir=/root/backups/   --exclude-tables="i88ca.*"  backup
For excluding multiple tables/database, you could pass multiple values separated by "|"
# ./mysqlbackup --user root --socket=/tmp/mysql.sock  --with-timestamp --backup-dir=/root/backups/   --exclude-tables="i88ca.*|hdgem.*"  backup
The --include-tables options works the same way as --exclude-tables, however when you specify both the options in the same command --include-tables will take precedence.