| 1 |
GRANT ALL PRIVILEGES on *.* TO backup_user IDENTIFIED by 'x' REQUIRE SSL; |
| 2 |
FLUSH PRIVILEGES; |
| 3 |
echo # xtrabackup backup; |
| 4 |
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup; |
| 5 |
--disable_result_log |
| 6 |
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --user=backup_user --password=x --ssl --backup --parallel=10 --target-dir=$targetdir; |
| 7 |
--enable_result_log |
| 8 |
|
| 9 |
echo # xtrabackup prepare; |
| 10 |
--disable_result_log |
| 11 |
exec $XTRABACKUP --prepare --target-dir=$targetdir; |
| 12 |
-- source include/restart_and_restore.inc |
| 13 |
--enable_result_log |
| 14 |
DROP USER backup_user; |
| 15 |
rmdir $targetdir; |
| 16 |
|
| 17 |
echo #; |
| 18 |
echo # MDEV-31855 validate ssl certificates using client password in the internal client; |
| 19 |
echo #; |
| 20 |
# fails to connect, passwordless root |
| 21 |
echo # tcp ssl ssl-verify-server-cert; |
| 22 |
let $host=; |
| 23 |
if ($MARIADB_UPGRADE_EXE) { |
| 24 |
# On Windows, we need host different from "127.0.0.1","::1" or "localhost" |
| 25 |
# to trigger self-signed error |
| 26 |
let $host=--host=127.0.0.2; |
| 27 |
} |
| 28 |
error 1; |
| 29 |
exec $XTRABACKUP --no-defaults $host --protocol=tcp --user=root --port=$MASTER_MYPORT --backup --target-dir=$targetdir; |
| 30 |
|
| 31 |
--echo # |
| 32 |
--echo # MDEV-32473 --disable-ssl doesn't disable it |
| 33 |
--echo # |
| 34 |
# connects fine |
| 35 |
echo # tcp skip-ssl; |
| 36 |
exec $XTRABACKUP --no-defaults --protocol=tcp --user=root --skip-ssl --port=$MASTER_MYPORT --backup --target-dir=$targetdir; |
| 37 |
rmdir $targetdir; |
| 38 |
|
| 39 |
--echo # |
| 40 |
--echo # MDEV-37143 Mariadb-backup fails on Windows with SSL certificate is self-signed error |
| 41 |
--echo # |
| 42 |
--echo # do not fail with passwordless with default protocol |
| 43 |
let $port_or_socket=--socket=$MASTER_MYSOCK; |
| 44 |
if ($MARIADB_UPGRADE_EXE) { # windows |
| 45 |
let $port_or_socket=--port=$MASTER_MYPORT; |
| 46 |
} |
| 47 |
exec $XTRABACKUP --no-defaults --user=root --backup $port_or_socket --target-dir=$targetdir; |
| 48 |
rmdir $targetdir; |
| 49 |
--echo # do not fail with passwordless with 127.0.0.1 TCP |
| 50 |
exec $XTRABACKUP --no-defaults --host=127.0.0.1 --protocol=tcp --port=$MASTER_MYPORT --user=root --backup --target-dir=$targetdir; |
| 51 |
rmdir $targetdir; |