We should have a test for mariabackup, something like this might be used:
dnf -y install mariadb-server
service mariadb start
mysql <<EOF
GRANT RELOAD ON *.* TO 'root'@'localhost';
FLUSH PRIVILEGES;
create table if not exists test.t1 (i int);
insert into test.t1 values (42);
EOF
mariabackup --user root --backup --target-dir=/tmp/backups/
service mariadb stop
rm -rf /var/lib/mysql/*
mariabackup --copy-back --target-dir=/tmp/backups/
chown -R mysql:mysql /var/lib/mysql/
restorecon -rv /var/lib/mysql/
service mariadb start
mysql_upgrade
mysql | grep -e 42 <<EOF
select * from test.t1;
EOF
We should have a test for mariabackup, something like this might be used: