I'm trying to figure out how to exclude or include specific tables when doing mysqldump command on AWS via terminal.
Background: I have a WordPress multisite but only need the tables with the first 3 characters "wp_" all of the other tables with prefixes like "wp_1", "wp_2", etc. I don't need in the dump file.
Here is the code I am using to generate the dump file which works but grabs all the tables in the database:
mysqldump -h RDS instance endpoint \
-u user \
-p databasename \
--port=3306 \
--single-transaction \
--routines \
--triggers \
--databases databasename > path/rds-dump.sql
Thanks!