How can I use mysqldump
to dump certain tables that start with common prefix?
To dump multiple tables with multiple where conditions. Then, for second table, use ">>". It will append the previous dump file.
By default, the mysqldump utility, which allows to back a MySQL database, will perform a lock on all tables until the backup is complete.
To dump large tables, you could combine the following two flags, --single-transaction and --quick .
Hehe, this is kind of a hack, but it works (using bash):
mysqldump -u USER -p DATABASE $(mysql -u USER -p -D DATABASE -Bse "show tables like 'PREFIX%'") > /tmp/DATABASE.out
Change the ALLCAPS words as needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With