MySQL and MariaDB mysqldump Backup and Recovery

  1. Knowledge Base
  2. Systems Administration
  3. Backup
  4. MySQL and MariaDB mysqldump Backup and Recovery

The mysqldump command is used to produce a “.sql” file that contains a set of SQL statements. This file can be executed to reproduce the original database table data and object definitions. The mysqldump command can be used to backup one or more MySQL databases. The database can be transferred to a new database server using this process.

mysqldump -u root -p -x -A > /volume1/web/mysqldump/yyyyMMddHHmmss-DatabaseName.sql

Command Flag Description:

--lock-all-tables, -x
--all-databases, -A
--password[=password], -p[password]
--user=user_name, -u user_name


Additional References:

Leave a Reply

Your email address will not be published. Required fields are marked *