The method of backing up MySQL is simple, just run the 'mysqldump' command.
It's the same with MariaDB.
This is written by a Japanese who can't speak English with the help of translation application. Sorry if it's not good.
Run the following command
mysqldump -uuser -ppassword db_name > backup.sql
|user||DB Connection User|
|password||DB connection password|
|backup.sql||Backup File Name|
Database connection user name
Database connection password
Redirect the 'mysqldump' command and write the backup contents to the backup.sql file.
Use this backup.sql to restore the database.