mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +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.
28 lines
901 B
Text
28 lines
901 B
Text
CREATE TABLE t(i INT) ENGINE INNODB;
|
|
INSERT INTO t VALUES(1);
|
|
echo # xtrabackup backup;
|
|
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
|
|
--disable_result_log
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --compress --target-dir=$targetdir;
|
|
--enable_result_log
|
|
|
|
INSERT INTO t VALUES(2);
|
|
|
|
|
|
echo # xtrabackup prepare;
|
|
--disable_result_log
|
|
# Because MDEV-24626 in 10.6 optimized file creation, we could end up with
|
|
# t.new.qp instead of t.ibd.qp unless a log checkpoint happened to be
|
|
# triggered between CREATE TABLE and the backup run.
|
|
--replace_result t.new t.ibd
|
|
list_files $targetdir/test *.qp;
|
|
exec $XTRABACKUP --decompress --remove-original --target-dir=$targetdir;
|
|
list_files $targetdir/test *.qp;
|
|
exec $XTRABACKUP --prepare --target-dir=$targetdir;
|
|
-- source include/restart_and_restore.inc
|
|
--enable_result_log
|
|
|
|
SELECT * FROM t;
|
|
DROP TABLE t;
|
|
rmdir $targetdir;
|