We all are aware of mysqldump which we use in command line to take backups of MySQL/MariaDB databases. However MariaDB has backup solution through mariabackup. It is very easy. Below is the command to take a compressed backup with 7z command.
mariabackup --user=root --backup --stream=xbstream | 7z a -si backup.xb.7z
Similarly we can uncompress it and replace the existing MariaDB data directory to restore the database. The command to uncompress is
7z e backup.xb.7z -so | mbstream -x
I have been using these method to backup the database to S3 and restore it when required for my clients. The beauty of it is we can take incremental backups.
For complete details follow this link and also here is an out of box script to use.