How to Back Up & Restore a MySQL Database
Back Up from the Command-Line with mysqldump The mysqldump client utility can dump a database including the SQL statements required to rebuild the database. By default, the dump file includes the SQL commands to restore the tables and data. To back up your MySQL database, the general syntax is: sudo mysqldump -u [user] -p [database_name] > […]