Skip to content
This repository was archived by the owner on Mar 18, 2026. It is now read-only.

Test mariabackup #4

@hhorak

Description

@hhorak

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions