mysqldump -u testuser -p testdb events --where="event_date>='2020-06-01' AND event_date<='2020-08-31'" > /tmp/backup_filtered.sql
If you want to export only certain rows from a MySQL database using
mysqldump , you can select the records using the
It dumps only rows selected by the given
WHERE condition. Quotes around the condition are mandatory if it contains spaces or other characters that are special to your command interpreter.