Commit 5de23b1d authored by Alexander Barkov's avatar Alexander Barkov

MDEV-31505 Deprecate mariabackup --innobackupex mode

1. "mariabackup --innobackupex" now prints a new warning:
       '--innobackupex' is deprecated and will be removed in a future release

2. "mariabackup --innobackupex" does not print this wrong warning any more:
        --innobackupex: Deprecated program name.
          It will be removed in a future release,
          use '/path/to/mariadb-backup' instead
parent 7ba9c7fb
...@@ -6778,6 +6778,12 @@ int main(int argc, char **argv) ...@@ -6778,6 +6778,12 @@ int main(int argc, char **argv)
} }
if(strcmp(argv[1], "--innobackupex") == 0) if(strcmp(argv[1], "--innobackupex") == 0)
{ {
/*
my_init() prints a "Deprecated program name"
warning if argv[0] does not start with "mariadb".
So pass the original argv[0] as the new argv[0].
*/
argv[1]= argv[0];
argv++; argv++;
argc--; argc--;
innobackupex_mode = true; innobackupex_mode = true;
...@@ -6853,6 +6859,8 @@ int main(int argc, char **argv) ...@@ -6853,6 +6859,8 @@ int main(int argc, char **argv)
static int main_low(char** argv) static int main_low(char** argv)
{ {
if (innobackupex_mode) { if (innobackupex_mode) {
msg(ER_DEFAULT(ER_WARN_DEPRECATED_SYNTAX_NO_REPLACEMENT),
"--innobackupex");
if (!ibx_init()) { if (!ibx_init()) {
return(EXIT_FAILURE); return(EXIT_FAILURE);
} }
......
...@@ -8,6 +8,14 @@ FOUND 1 /should only be used with "--apply-log"/ in backup.log ...@@ -8,6 +8,14 @@ FOUND 1 /should only be used with "--apply-log"/ in backup.log
FOUND 1 /innodb_force_recovery = 1/ in backup.log FOUND 1 /innodb_force_recovery = 1/ in backup.log
# "innodb_force_recovery" should be limited to "SRV_FORCE_IGNORE_CORRUPT" (innobackupex) # "innodb_force_recovery" should be limited to "SRV_FORCE_IGNORE_CORRUPT" (innobackupex)
FOUND 1 /innodb_force_recovery = 1/ in backup.log FOUND 1 /innodb_force_recovery = 1/ in backup.log
#
# This fragment was added for MDEV-31505 Deprecate mariabackup --innobackupex mode
#
NOT FOUND /Deprecated program name/ in backup.log
FOUND 1 /[-][-]innobackupex.*is deprecated and will be removed in a future release/ in backup.log
#
# End of the MDEV-31505 fragment
#
# "innodb_force_recovery" should be read from "backup-my.cnf" (mariabackup) # "innodb_force_recovery" should be read from "backup-my.cnf" (mariabackup)
FOUND 1 /innodb_force_recovery = 1/ in backup.log FOUND 1 /innodb_force_recovery = 1/ in backup.log
# "innodb_force_recovery=1" should be read from "backup-my.cnf" (innobackupex) # "innodb_force_recovery=1" should be read from "backup-my.cnf" (innobackupex)
......
...@@ -52,6 +52,16 @@ exec $XTRABACKUP --innobackupex --apply-log --innodb-force-recovery=2 $targetdir ...@@ -52,6 +52,16 @@ exec $XTRABACKUP --innobackupex --apply-log --innodb-force-recovery=2 $targetdir
--let SEARCH_PATTERN=innodb_force_recovery = 1 --let SEARCH_PATTERN=innodb_force_recovery = 1
--let SEARCH_FILE=$backuplog --let SEARCH_FILE=$backuplog
--source include/search_pattern_in_file.inc --source include/search_pattern_in_file.inc
--echo #
--echo # This fragment was added for MDEV-31505 Deprecate mariabackup --innobackupex mode
--echo #
--let SEARCH_PATTERN=Deprecated program name
--source include/search_pattern_in_file.inc
--let SEARCH_PATTERN=[-][-]innobackupex.*is deprecated and will be removed in a future release
--source include/search_pattern_in_file.inc
--echo #
--echo # End of the MDEV-31505 fragment
--echo #
rmdir $targetdir; rmdir $targetdir;
# Check for default file ("backup-my.cnf"). # Check for default file ("backup-my.cnf").
......
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