Skip to main content
Kill -9 Club
Sign in

mariadb-dump

DatabasesPackage: mariadb-client

Exports a MariaDB database as SQL. --single-transaction gets a consistent copy of InnoDB tables without locking them, which a backup on a live service requires.

What its options do in the lessons

From the same glossary the lessons render under their commands, so the two cannot disagree.

mariadb-dump -u
The MariaDB user.
mariadb-dump -p
Prompts for the password. Attaching it directly (-pMyPassword) exposes it in the process list and the shell history.
mariadb-dump --databases
Dumps the named databases including their CREATE DATABASE statements — which is what makes restoring onto a clean server possible.
mariadb-dump --single-transaction
Takes the dump in a single transaction: consistent and without locking the tables, on InnoDB.
mariadb-dump --quick
Writes row by row instead of loading each table into memory, which is what makes a large database dumpable.

Lessons that teach it