mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +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.
24 lines
712 B
Text
24 lines
712 B
Text
--source include/innodb_page_size.inc
|
|
|
|
CREATE TABLE t(i INT) ENGINE INNODB;
|
|
INSERT INTO t VALUES(1);
|
|
|
|
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
|
|
mkdir $targetdir;
|
|
let $streamfile=$MYSQLTEST_VARDIR/tmp/backup.xb;
|
|
|
|
echo # xtrabackup backup to stream;
|
|
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --backup --parallel=10 --databases-exclude=foobar --stream=xbstream > $streamfile 2>$targetdir/backup_stream.log;
|
|
echo # xbstream extract;
|
|
--disable_result_log
|
|
exec $XBSTREAM -x -C $targetdir < $streamfile;
|
|
|
|
echo # xtrabackup prepare;
|
|
exec $XTRABACKUP --prepare --target-dir=$targetdir;
|
|
|
|
-- source include/restart_and_restore.inc
|
|
--enable_result_log
|
|
SELECT * FROM t;
|
|
DROP TABLE t;
|
|
rmdir $targetdir;
|
|
|