blob: 977535556cc827ecd472ed8c4f86cdf3f9c1adcd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
--source include/big_test.inc
--source include/have_innodb.inc
--source include/have_mariabackup.inc
--source hashicorp_plugin.inc
--source hashicorp_init.inc
CREATE TABLE t(i INT) ENGINE INNODB encrypted=yes encryption_key_id=1;
INSERT INTO t VALUES(1);
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--error 0,1
rmdir $targetdir;
echo # mariabackup backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$targetdir;
--enable_result_log
INSERT INTO t VALUES(2);
echo # mariabackup prepare;
--disable_result_log
exec $XTRABACKUP --prepare --target-dir=$targetdir;
let $_datadir= `SELECT @@datadir`;
echo # shutdown server;
--source include/shutdown_mysqld.inc
echo # remove datadir;
rmdir $_datadir;
echo # mariabackup move back;
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --copy-back --datadir=$_datadir --target-dir=$targetdir --parallel=2 --throttle=1;
--source include/start_mysqld.inc
--enable_result_log
SELECT * FROM t;
DROP TABLE t;
rmdir $targetdir;
--source hashicorp_deinit.inc
|