Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test mariabackup #4

Open
hhorak opened this issue Sep 11, 2017 · 0 comments
Open

Test mariabackup #4

hhorak opened this issue Sep 11, 2017 · 0 comments

Comments

@hhorak
Copy link
Collaborator

hhorak commented Sep 11, 2017

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant