Creating a dump file with mysqldump

The mysqldump command is the most used tool to perform hot logical backups. It is included in all MariaDB distributions and is located in the bin directory.

Usually, mysqldump is used to create a dump file: it connects to MariaDB, reads the data we want to back up, and creates a file containing the SQL statements that are required to recreate the same data. It has several options that allow us to control which data is included in the backup and modify the SQL statements that are written in the file. The dump file can also be manually edited to fit particular needs. The generated SQL statements use executable comments (mentioned in Chapter 1, Understanding the Essentials of MariaDB) so that it is possible to ...

Get Mastering MariaDB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.