Briefly about MySQL/mariadb backups in Ubuntu

If you were waiting for the right moment… It was him.

Make a backup of the MySQL database, MariaDB:

mysqldump -u username -p database_to_backup > backup_name.sql

Restore from the dump MySQL, MariaDB:

mysql -u username -p database_name < backup_name.sql