Sometimes I only need part of a table: the rows of one customer, one year, one site. A full dump plus a lot of deleting is the long way. mariadb-dump can filter while it dumps.
mariadb-dump --single-transaction --where="created_at >= '2026-01-01'" appdb orders > orders-2026.sql
The docs say -w / --where dumps only the rows selected by the condition, and that the quotes around it are mandatory when it contains spaces or characters your shell treats specially. That is easy to forget, and the shell then splits your condition into pieces. It is also why a date comparison like the one above needs the single quotes inside the double quotes.
I use it on one table at a time, since a single condition has to make sense for every table you name on the command line.
Other options from the same page combine well with it. --no-create-info (-t) skips the CREATE TABLE statements, so the file contains only rows, which is what you want when you load the slice into a table that already exists. --insert-ignore makes the statements INSERT IGNORE, so rows that are already there are skipped. --replace writes REPLACE INTO, so they are overwritten.
Caveat: a slice is not a backup. The condition only selects rows of the table you name, so related rows in other tables are not included unless you dump them as well. Treat it as an export for moving or inspecting data, and keep your normal full dump too.
Further reading: MariaDB documentation: mariadb-dump