Skip to content

Commit e093e5a

Browse files
committed
MDEV-30276 - wsrep_sst_mariabackup to use mariadb-backup
rather than mariabackup internally, and change and messages accordingly.
1 parent 402f36d commit e093e5a

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

scripts/wsrep_sst_mariabackup.sh

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ sst_ver=1
9595

9696
declare -a RC
9797

98-
BACKUP_BIN=$(commandex 'mariabackup')
98+
BACKUP_BIN=$(commandex 'mariadb-backup')
9999
if [ -z "$BACKUP_BIN" ]; then
100-
wsrep_log_error 'mariabackup binary not found in path'
100+
wsrep_log_error 'mariadb-backup binary not found in path'
101101
exit 42
102102
fi
103103

@@ -685,7 +685,7 @@ cleanup_at_exit()
685685
if [ -n "$BACKUP_PID" ]; then
686686
if check_pid "$BACKUP_PID" 1; then
687687
wsrep_log_error \
688-
"mariabackup process is still running. Killing..."
688+
"mariadb-backup process is still running. Killing..."
689689
cleanup_pid $CHECK_PID "$BACKUP_PID"
690690
fi
691691
fi
@@ -761,7 +761,7 @@ check_extra()
761761
if [ "$thread_handling" = 'pool-of-threads' ]; then
762762
local eport=$(parse_cnf '--mysqld' 'extra-port')
763763
if [ -n "$eport" ]; then
764-
# mariabackup works only locally.
764+
# mariadb-backup works only locally.
765765
# Hence, setting host to 127.0.0.1 unconditionally:
766766
wsrep_log_info "SST through extra_port $eport"
767767
INNOEXTRA="$INNOEXTRA --host=127.0.0.1 --port=$eport"
@@ -930,7 +930,7 @@ cd "$OLD_PWD"
930930

931931
if [ $ssyslog -eq 1 ]; then
932932
if [ -n "$(commandex logger)" ]; then
933-
wsrep_log_info "Logging all stderr of SST/mariabackup to syslog"
933+
wsrep_log_info "Logging all stderr of SST/mariadb-backup to syslog"
934934

935935
exec 2> >(logger -p daemon.err -t ${ssystag}wsrep-sst-$WSREP_SST_OPT_ROLE)
936936

@@ -1053,11 +1053,11 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
10531053
xtmpdir=$(TMPDIR="$tmpdir"; mktemp '-d')
10541054
fi
10551055

1056-
wsrep_log_info "Using '$xtmpdir' as mariabackup temporary directory"
1056+
wsrep_log_info "Using '$xtmpdir' as mariadb-backup temporary directory"
10571057
tmpopts=" --tmpdir='$xtmpdir'"
10581058

10591059
itmpdir="$(mktemp -d)"
1060-
wsrep_log_info "Using '$itmpdir' as mariabackup working directory"
1060+
wsrep_log_info "Using '$itmpdir' as mariadb-abackup working directory"
10611061

10621062
usrst=0
10631063
if [ -n "$WSREP_SST_OPT_USER" ]; then
@@ -1148,7 +1148,7 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
11481148
fi
11491149

11501150
# if compression is enabled for backup files, then add the
1151-
# appropriate options to the mariabackup command line:
1151+
# appropriate options to the mariadb-backup command line:
11521152
if [ "$compress" != 'none' ]; then
11531153
iopts="--compress${compress:+=$compress}${iopts:+ }$iopts"
11541154
if [ -n "$compress_threads" ]; then
@@ -1170,15 +1170,15 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
11701170
set -e
11711171

11721172
if [ ${RC[0]} -ne 0 ]; then
1173-
wsrep_log_error "mariabackup finished with error: ${RC[0]}." \
1173+
wsrep_log_error "mariadb-backup finished with error: ${RC[0]}." \
11741174
"Check syslog or '$INNOBACKUPLOG' for details"
11751175
exit 22
11761176
elif [ ${RC[$(( ${#RC[@]}-1 ))]} -eq 1 ]; then
11771177
wsrep_log_error "$tcmd finished with error: ${RC[1]}"
11781178
exit 22
11791179
fi
11801180

1181-
# mariabackup implicitly writes PID to fixed location in $xtmpdir
1181+
# mariadb-backup implicitly writes PID to fixed location in $xtmpdir
11821182
BACKUP_PID="$xtmpdir/xtrabackup_pid"
11831183

11841184
else # BYPASS FOR IST
@@ -1450,14 +1450,14 @@ else # joiner
14501450

14511451
if [ ! -s "$DATA/xtrabackup_checkpoints" ]; then
14521452
wsrep_log_error "xtrabackup_checkpoints missing," \
1453-
"failed mariabackup/SST on donor"
1453+
"failed mariadb-backup/SST on donor"
14541454
exit 2
14551455
fi
14561456

1457-
# Compact backups are not supported by mariabackup
1457+
# Compact backups are not supported by mariadb-backup
14581458
if grep -qw -F 'compact = 1' "$DATA/xtrabackup_checkpoints"; then
14591459
wsrep_log_info "Index compaction detected"
1460-
wsrel_log_error "Compact backups are not supported by mariabackup"
1460+
wsrel_log_error "Compact backups are not supported by mariadb-backup"
14611461
exit 2
14621462
fi
14631463

@@ -1509,9 +1509,9 @@ else # joiner
15091509

15101510
wsrep_log_info "Preparing the backup at $DATA"
15111511
setup_commands
1512-
timeit 'mariabackup prepare stage' "$INNOAPPLY"
1512+
timeit 'mariadb-backup prepare stage' "$INNOAPPLY"
15131513
if [ $? -ne 0 ]; then
1514-
wsrep_log_error "mariabackup apply finished with errors." \
1514+
wsrep_log_error "mariadb-backup apply finished with errors." \
15151515
"Check syslog or '$INNOAPPLYLOG' for details."
15161516
exit 22
15171517
fi
@@ -1556,7 +1556,7 @@ else # joiner
15561556
MAGIC_FILE="$TDATA/$INFO_FILE"
15571557

15581558
wsrep_log_info "Moving the backup to $TDATA"
1559-
timeit 'mariabackup move stage' "$INNOMOVE"
1559+
timeit 'mariadb-backup move stage' "$INNOMOVE"
15601560
if [ $? -eq 0 ]; then
15611561
wsrep_log_info "Move successful, removing $DATA"
15621562
rm -rf "$DATA"

0 commit comments

Comments
 (0)