Commit 125ce6f8 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-14102 restore --remove-original options for mariabackup

parent 2aa51f52
......@@ -837,6 +837,11 @@ struct my_option xb_client_options[] =
(uchar*) &opt_incremental_history_uuid, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"remove-original", OPT_REMOVE_ORIGINAL, "Remove .qp files after decompression.",
(uchar *) &opt_remove_original,
(uchar *) &opt_remove_original,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
"This option specifies which types of queries are allowed to complete "
"before innobackupex will issue the global lock. Default is all.",
......
CREATE TABLE t(i INT) ENGINE INNODB;
INSERT INTO t VALUES(1);
# xtrabackup backup
INSERT INTO t VALUES(2);
# xtrabackup prepare
t.frm.qp
t.ibd.qp
# shutdown server
# remove datadir
# xtrabackup move back
# restart server
SELECT * FROM t;
i
1
DROP TABLE t;
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 --compress --target-dir=$targetdir;
--enable_result_log
INSERT INTO t VALUES(2);
echo # xtrabackup prepare;
--disable_result_log
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;
......@@ -3,6 +3,7 @@ package My::Suite::MariaBackup;
@ISA = qw(My::Suite);
use My::Find;
use File::Basename;
use File::Which;
use strict;
return "Not run for embedded server" if $::opt_embedded_server;
......@@ -26,6 +27,7 @@ $ENV{INNOBACKUPEX}= "$mariabackup_exe --innobackupex";
sub skip_combinations {
my %skip;
$skip{'include/have_file_key_management.inc'} = 'needs file_key_management plugin' unless $ENV{FILE_KEY_MANAGEMENT_SO};
$skip{'compress_qpress.test'}= 'needs qpress executable in PATH' unless which 'qpress';
%skip;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment