← Back to team overview

maria-discuss team mailing list archive

restore problem with xtrabackup

 

i have installed mariadb 1.10.13 cluster with user "root", password "pass"
I have created test database "galeratest":

CREATE DATABASE galeratest;USE galeratest;CREATE TABLE test_table (
        id INT PRIMARY KEY AUTO_INCREMENT,
        msg TEXT ) ENGINE=InnoDB;INSERT INTO test_table (msg)
        VALUES ("Hello cluster.");

backup:
xtrabackup --user=root --password=pass --backup --target-dir=/media
161219 21:06:00  version_check Connecting to MySQL server with DSN
'dbi:mysql:;mysql_read_default_group=xtrabackup;port=3306;mysql_socket=/var/run/mysqld/mysqld.sock'
as 'root'  (using password: YES).
161219 21:06:00  version_check Connected to MySQL server
161219 21:06:00  version_check Executing a version check against the server...
...

ok
..

At this point i drop my database : DROP DATABASE galeratest;

and trying to restore:
xtrabackup --user=root --password=pass --prepare --target-dir=/media


cd /media/
rsync -rvt --exclude 'xtrabackup_checkpoints' --exclude 'xtrabackup_logfile' \
   ./ /var/lib/mysql
chown -R mysql:mysql /var/lib/mysql/

MariaDB [galeratest]> show tables;
+----------------------+
| Tables_in_galeratest |
+----------------------+
| test_table           |
+----------------------+
1 row in set (0.00 sec)

MariaDB [galeratest]> select * from test_table;


*ERROR 1932 (42S02): Table 'galeratest.test_table' doesn't exist in engine*

*Any idea what the problem is? *

Thanks,

Follow ups