mirror of
https://github.com/MariaDB/server.git
synced 2025-01-30 10:31:54 +01:00
1c55b845e0
Added support to BACKUP STAGE to maria-backup This is a port of the code from ES 10.6 See MDEV-5336 for backup stages description. The following old options are not supported by the new code: --rsync ; This is because rsync will not work on tables that are in used. --no-backup-locks ; This is disabled as mariadb-backup will always use backup locks for better performance.
22 lines
683 B
Text
22 lines
683 B
Text
--source include/have_debug.inc
|
|
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
mkdir $targetdir;
|
|
CREATE TABLE t1(i int) ENGINE INNODB;
|
|
set global innodb_log_checkpoint_now = 1;
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --target-dir=$targetdir --lock-ddl-per-table --dbug=+d,rename_during_mdl_lock_table;
|
|
|
|
echo # xtrabackup prepare;
|
|
--disable_result_log
|
|
exec $XTRABACKUP --prepare --target-dir=$targetdir;
|
|
-- source include/restart_and_restore.inc
|
|
--enable_result_log
|
|
# the table was renamed from t1 to t2
|
|
# make sure t1 does not exist, and t2 does
|
|
|
|
CREATE TABLE t1(i int);
|
|
DROP TABLE t1;
|
|
SELECT * from t2;
|
|
DROP TABLE t2;
|
|
|
|
rmdir $targetdir;
|
|
|