File: backup_ssl.test

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (51 lines) | stat: -rw-r--r-- 1,923 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
GRANT ALL PRIVILEGES on *.* TO backup_user IDENTIFIED by 'x' REQUIRE SSL;
FLUSH PRIVILEGES;
echo # xtrabackup backup;
let $targetdir=$MYSQLTEST_VARDIR/tmp/backup;
--disable_result_log
exec $XTRABACKUP --defaults-file=$MYSQLTEST_VARDIR/my.cnf --user=backup_user --password=x --ssl --backup --parallel=10 --target-dir=$targetdir;
--enable_result_log

echo # xtrabackup prepare;
--disable_result_log
exec $XTRABACKUP  --prepare --target-dir=$targetdir;
-- source include/restart_and_restore.inc
--enable_result_log
DROP USER backup_user;
rmdir $targetdir;

echo #;
echo # MDEV-31855 validate ssl certificates using client password in the internal client;
echo #;
# fails to connect, passwordless root
echo # tcp ssl ssl-verify-server-cert;
let $host=;
if ($MARIADB_UPGRADE_EXE) {
  # On Windows, we need host different from "127.0.0.1","::1" or "localhost"
  # to trigger self-signed error
  let $host=--host=127.0.0.2;
}
error 1;
exec $XTRABACKUP --no-defaults $host --protocol=tcp --user=root --port=$MASTER_MYPORT --backup --target-dir=$targetdir;

--echo #
--echo # MDEV-32473 --disable-ssl doesn't disable it
--echo #
# connects fine
echo # tcp skip-ssl;
exec $XTRABACKUP --no-defaults --protocol=tcp --user=root --skip-ssl --port=$MASTER_MYPORT --backup --target-dir=$targetdir;
rmdir $targetdir;

--echo #
--echo # MDEV-37143 Mariadb-backup fails on Windows with SSL certificate is self-signed error
--echo #
--echo # do not fail with passwordless with default protocol
let $port_or_socket=--socket=$MASTER_MYSOCK;
if ($MARIADB_UPGRADE_EXE) { # windows
  let  $port_or_socket=--port=$MASTER_MYPORT;
}
exec $XTRABACKUP --no-defaults --user=root --backup $port_or_socket --target-dir=$targetdir;
rmdir $targetdir;
--echo # do not fail with passwordless with 127.0.0.1 TCP
exec $XTRABACKUP --no-defaults --host=127.0.0.1 --protocol=tcp --port=$MASTER_MYPORT --user=root --backup --target-dir=$targetdir;
rmdir $targetdir;