Hi All, this document shows you how to take mysqldump for tables with a specific pattern.
Mysqldump it’s a client utility performs logical backup producing the set of SQL statements that can be executed to reproduce the original database.
In this tutorial, I will show you how to take backup of tables with a pattern.
Execute the below commands to take backup of tables with a specific pattern
mysql wrong -u [username] -p[Password] -N -e ‘show tables like “wp_us%”‘ | xargs mysqldump wrong -u [username] -p[Password] > /tmp/sql.sql
the above command takes backup of wp_us* tables to sql.sql file located in /tmp/
© 2018, Techrunnr. All rights reserved.