mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-9566 MariaBackup test suite
This commit is contained in:
committed by
Sergei Golubchik
parent
1991411f16
commit
ca24f35b67
35
mysql-test/suite/mariabackup/incremental_backup.test
Normal file
35
mysql-test/suite/mariabackup/incremental_backup.test
Normal file
@@ -0,0 +1,35 @@
|
||||
call mtr.add_suppression("InnoDB: New log files created");
|
||||
|
||||
|
||||
let $basedir=$MYSQLTEST_VARDIR/tmp/backup;
|
||||
let $incremental_dir=$MYSQLTEST_VARDIR/tmp/backup_inc1;
|
||||
|
||||
|
||||
CREATE TABLE t(i INT) ENGINE INNODB;
|
||||
INSERT INTO t VALUES(1);
|
||||
|
||||
echo # Create full backup , modify table, then create incremental/differential backup;
|
||||
--disable_result_log
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$basedir;
|
||||
--enable_result_log
|
||||
INSERT INTO t VALUES(2);
|
||||
SELECT * FROM t;
|
||||
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --target-dir=$incremental_dir --incremental-basedir=$basedir;
|
||||
|
||||
--disable_result_log
|
||||
echo # Prepare full backup, apply incremental one;
|
||||
exec $XTRABACKUP --prepare --apply-log-only --target-dir=$basedir;
|
||||
exec $XTRABACKUP --prepare --target-dir=$basedir --incremental-dir=$incremental_dir ;
|
||||
|
||||
echo # Restore and check results;
|
||||
let $targetdir=$basedir;
|
||||
-- source include/restart_and_restore.inc
|
||||
--enable_result_log
|
||||
|
||||
SELECT * FROM t;
|
||||
DROP TABLE t;
|
||||
|
||||
# Cleanup
|
||||
rmdir $basedir;
|
||||
rmdir $incremental_dir;
|
||||
|
Reference in New Issue
Block a user