Commit e5c694ac authored by Monty's avatar Monty

Give warnings if one tries to use obsolete options with mariadb-backup

Other things:
- Disabled not supported options
- Updated copyright message
parent 1c55b845
...@@ -80,7 +80,6 @@ my_bool opt_ibx_no_lock = FALSE; ...@@ -80,7 +80,6 @@ my_bool opt_ibx_no_lock = FALSE;
my_bool opt_ibx_safe_slave_backup = FALSE; my_bool opt_ibx_safe_slave_backup = FALSE;
my_bool opt_ibx_force_non_empty_dirs = FALSE; my_bool opt_ibx_force_non_empty_dirs = FALSE;
my_bool opt_ibx_noversioncheck = FALSE; my_bool opt_ibx_noversioncheck = FALSE;
my_bool opt_ibx_no_backup_locks = FALSE;
my_bool opt_ibx_decompress = FALSE; my_bool opt_ibx_decompress = FALSE;
char *opt_ibx_incremental_history_name = NULL; char *opt_ibx_incremental_history_name = NULL;
...@@ -267,8 +266,10 @@ static struct my_option ibx_long_options[] = ...@@ -267,8 +266,10 @@ static struct my_option ibx_long_options[] =
(uchar *) &opt_ibx_incremental, (uchar *) &opt_ibx_incremental, 0, (uchar *) &opt_ibx_incremental, (uchar *) &opt_ibx_incremental, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-lock", OPT_NO_LOCK, "Use this option to disable table lock " {"no-lock", OPT_NO_LOCK, "This option should not be used as "
"with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your " "mariadb-backup now is using BACKUP LOCKS, which minimizes the "
"lock time. ALTER TABLE can run in parallel with BACKUP LOCKS."
"Use the --no-lock option it only if ALL your "
"tables are InnoDB and you DO NOT CARE about the binary log " "tables are InnoDB and you DO NOT CARE about the binary log "
"position of the backup. This option shouldn't be used if there " "position of the backup. This option shouldn't be used if there "
"are any DDL statements being executed or if any updates are " "are any DDL statements being executed or if any updates are "
...@@ -320,13 +321,9 @@ static struct my_option ibx_long_options[] = ...@@ -320,13 +321,9 @@ static struct my_option ibx_long_options[] =
(uchar *) &opt_ibx_noversioncheck, (uchar *) &opt_ibx_noversioncheck,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-backup-locks", OPT_NO_BACKUP_LOCKS, "This option controls if " {"no-backup-locks", OPT_NO_BACKUP_LOCKS,
"backup locks should be used instead of FLUSH TABLES WITH READ LOCK " "Old disabled option which has no effect anymore.",
"on the backup stage. The option has no effect when backup locks are " (uchar *) 0, (uchar*) 0,
"not supported by the server. This option is enabled by default, "
"disable with --no-backup-locks.",
(uchar *) &opt_ibx_no_backup_locks,
(uchar *) &opt_ibx_no_backup_locks,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"decompress", OPT_DECOMPRESS, "Decompresses all files with the .qp " {"decompress", OPT_DECOMPRESS, "Decompresses all files with the .qp "
...@@ -392,11 +389,10 @@ static struct my_option ibx_long_options[] = ...@@ -392,11 +389,10 @@ static struct my_option ibx_long_options[] =
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
"This option specifies which types of queries are allowed to complete " "Old disabled option which has no effect anymore (not needed "
"before innobackupex will issue the global lock. Default is all.", "with BACKUP LOCKS)",
(uchar*) &opt_ibx_lock_wait_query_type, (uchar*) 0, (uchar*) 0, &query_type_typelib, GET_ENUM,
(uchar*) &opt_ibx_lock_wait_query_type, &query_type_typelib, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
{"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE, {"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE,
"This option specifies which types of queries should be killed to " "This option specifies which types of queries should be killed to "
...@@ -437,32 +433,32 @@ static struct my_option ibx_long_options[] = ...@@ -437,32 +433,32 @@ static struct my_option ibx_long_options[] =
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT,
"This option specifies the number of seconds innobackupex waits " "Old disabled option which has no effect anymore (not needed "
"between starting FLUSH TABLES WITH READ LOCK and killing those " "with BACKUP LOCKS)",
"queries that block it. Default is 0 seconds, which means " (uchar*) 0, (uchar*) 0, 0, GET_UINT,
"innobackupex will not attempt to kill any queries.",
(uchar*) &opt_ibx_kill_long_queries_timeout,
(uchar*) &opt_ibx_kill_long_queries_timeout, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
"This option specifies time in seconds that innobackupex should wait " "Alias for startup-wait-timeout",
"for queries that would block FTWRL before running it. If there are " (uchar*) &opt_ibx_lock_wait_timeout,
"still such queries when the timeout expires, innobackupex terminates " (uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT,
"with an error. Default is 0, in which case innobackupex does not " REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
"wait for queries to complete and starts FTWRL immediately.",
(uchar*) &opt_ibx_lock_wait_timeout, {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
(uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT, "This option specifies time in seconds that mariadb-backup should wait for "
"BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
"currently running queries using explicite LOCK TABLES has ended. "
"If there are still such queries when the timeout expires, mariadb-backup "
"terminates with an error. Default is 0, in which case mariadb-backup waits "
"indefinitely for BACKUP STAGE START to finish",
(uchar*) &opt_ibx_lock_wait_timeout,
(uchar*) &opt_ibx_lock_wait_timeout, 0, GET_UINT,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD,
"This option specifies the query run time threshold which is used by " "Old disabled option which has no effect anymore (not needed "
"innobackupex to detect long-running queries with a non-zero value " "with BACKUP LOCKS)",
"of --ftwrl-wait-timeout. FTWRL is not started until such " (uchar*) 0, (uchar*) 0, 0, GET_UINT,
"long-running queries exist. This option has no effect if "
"--ftwrl-wait-timeout is 0. Default value is 60 seconds.",
(uchar*) &opt_ibx_lock_wait_threshold,
(uchar*) &opt_ibx_lock_wait_threshold, 0, GET_UINT,
REQUIRED_ARG, 60, 0, 0, 0, 0, 0}, REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
{"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT, {"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT,
......
...@@ -147,8 +147,8 @@ my_bool xtrabackup_decrypt_decompress; ...@@ -147,8 +147,8 @@ my_bool xtrabackup_decrypt_decompress;
my_bool xtrabackup_print_param; my_bool xtrabackup_print_param;
my_bool xtrabackup_mysqld_args; my_bool xtrabackup_mysqld_args;
my_bool xtrabackup_help; my_bool xtrabackup_help;
my_bool xtrabackup_export; my_bool xtrabackup_export;
my_bool ignored_option;
longlong xtrabackup_use_memory; longlong xtrabackup_use_memory;
...@@ -1351,6 +1351,7 @@ enum options_xtrabackup ...@@ -1351,6 +1351,7 @@ enum options_xtrabackup
OPT_NO_LOCK, OPT_NO_LOCK,
OPT_SAFE_SLAVE_BACKUP, OPT_SAFE_SLAVE_BACKUP,
OPT_RSYNC, OPT_RSYNC,
OPT_NO_BACKUP_LOCKS,
OPT_FORCE_NON_EMPTY_DIRS, OPT_FORCE_NON_EMPTY_DIRS,
OPT_NO_VERSION_CHECK, OPT_NO_VERSION_CHECK,
OPT_DECOMPRESS, OPT_DECOMPRESS,
...@@ -1564,8 +1565,10 @@ struct my_option xb_client_options[]= { ...@@ -1564,8 +1565,10 @@ struct my_option xb_client_options[]= {
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"no-lock", OPT_NO_LOCK, {"no-lock", OPT_NO_LOCK,
"Use this option to disable table lock " "This option should not be used as "
"with \"FLUSH TABLES WITH READ LOCK\". Use it only if ALL your " "mariadb-backup now is using BACKUP LOCKS, which minimizes the "
"lock time. ALTER TABLE can run in parallel with BACKUP LOCKS."
"Use the --no-lock option it only if ALL your "
"tables are InnoDB and you DO NOT CARE about the binary log " "tables are InnoDB and you DO NOT CARE about the binary log "
"position of the backup. This option shouldn't be used if there " "position of the backup. This option shouldn't be used if there "
"are any DDL statements being executed or if any updates are " "are any DDL statements being executed or if any updates are "
...@@ -1593,6 +1596,14 @@ struct my_option xb_client_options[]= { ...@@ -1593,6 +1596,14 @@ struct my_option xb_client_options[]= {
(uchar *) &opt_safe_slave_backup, (uchar *) &opt_safe_slave_backup, 0, (uchar *) &opt_safe_slave_backup, (uchar *) &opt_safe_slave_backup, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"rsync", OPT_RSYNC,
"Obsolete depricated option",
&ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"no-backup-locks", OPT_NO_BACKUP_LOCKS,
"Obsolete depricated option",
&ignored_option, &ignored_option, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS, {"force-non-empty-directories", OPT_FORCE_NON_EMPTY_DIRS,
"This " "This "
"option, when specified, makes --copy-back or --move-back transfer " "option, when specified, makes --copy-back or --move-back transfer "
...@@ -1685,11 +1696,10 @@ struct my_option xb_client_options[]= { ...@@ -1685,11 +1696,10 @@ struct my_option xb_client_options[]= {
(uchar *) &opt_remove_original, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (uchar *) &opt_remove_original, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE,
"This option specifies which types of queries are allowed to complete " "Old disabled option which has no effect anymore (not needed "
"before " XB_TOOL_NAME " will issue the global lock. Default is all.", "with BACKUP LOCKS)",
(uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type, (uchar*) 0, (uchar*) 0, &query_type_typelib, GET_ENUM,
&query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0},
0},
{"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE, {"kill-long-query-type", OPT_KILL_LONG_QUERY_TYPE,
"This option specifies which types of queries should be killed to " "This option specifies which types of queries should be killed to "
...@@ -1706,32 +1716,31 @@ struct my_option xb_client_options[]= { ...@@ -1706,32 +1716,31 @@ struct my_option xb_client_options[]= {
NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT,
"This option specifies the number of seconds " XB_TOOL_NAME " waits " "Old disabled option which has no effect anymore (not needed "
"between starting FLUSH TABLES WITH READ LOCK and killing those " "with BACKUP LOCKS)",
"queries that block it. Default is 0 seconds, which means " (uchar*) 0, (uchar*) 0, 0, GET_UINT, REQUIRED_ARG, 0, 0,
XB_TOOL_NAME " will not attempt to kill any queries.",
(uchar *) &opt_kill_long_queries_timeout,
(uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0,
0, 0, 0, 0}, 0, 0, 0, 0},
{"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
"This option specifies time in seconds that " XB_TOOL_NAME " should wait " "Alias for startup-wait-timeout",
"for queries that would block FTWRL before running it. If there are " (uchar*) &opt_lock_wait_timeout, (uchar*) &opt_lock_wait_timeout,
"still such queries when the timeout expires, " XB_TOOL_NAME " terminates " 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
"with an error. Default is 0, in which case " XB_TOOL_NAME " does not "
"wait for queries to complete and starts FTWRL immediately.", {"startup-wait-timeout", OPT_LOCK_WAIT_TIMEOUT,
(uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0, "This option specifies time in seconds that mariadb-backup should wait for "
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, "BACKUP STAGE START to complete. BACKUP STAGE START has to wait until all "
"currently running queries using explicite LOCK TABLES has ended. "
"If there are still such queries when the timeout expires, mariadb-backup "
"terminates with an error. Default is 0, in which case mariadb-backup waits "
"indefinitely for BACKUP STAGE START to finish",
(uchar*) &opt_lock_wait_timeout, (uchar*) &opt_lock_wait_timeout,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD,
"This option specifies the query run time threshold which is used by " "Old disabled option which has no effect anymore (not needed "
XB_TOOL_NAME " to detect long-running queries with a non-zero value " "with BACKUP LOCKS)",
"of --ftwrl-wait-timeout. FTWRL is not started until such " (uchar*) 0, (uchar*) 0, 0, GET_UINT,
"long-running queries exist. This option has no effect if " REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
"--ftwrl-wait-timeout is 0. Default value is 60 seconds.",
(uchar *) &opt_lock_wait_threshold, (uchar *) &opt_lock_wait_threshold, 0,
GET_UINT, REQUIRED_ARG, 60, 0, 0, 0, 0, 0},
{"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT, {"safe-slave-backup-timeout", OPT_SAFE_SLAVE_BACKUP_TIMEOUT,
"How many seconds --safe-slave-backup should wait for " "How many seconds --safe-slave-backup should wait for "
...@@ -2150,7 +2159,8 @@ static void usage(void) ...@@ -2150,7 +2159,8 @@ static void usage(void)
puts("Open source backup tool for InnoDB and XtraDB\n\ puts("Open source backup tool for InnoDB and XtraDB\n\
\n\ \n\
Copyright (C) 2009-2015 Percona LLC and/or its affiliates.\n\ Copyright (C) 2009-2015 Percona LLC and/or its affiliates.\n\
Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy. All Rights Reserved.\n\ Portions Copyright (C) 2000, 2011, MySQL AB & Innobase Oy.\n\
Portions Copyright (C) 2017-2023 MariaDB Corporation / MariaDB Plc.\n\
\n\ \n\
This program is free software; you can redistribute it and/or\n\ This program is free software; you can redistribute it and/or\n\
modify it under the terms of the GNU General Public License\n\ modify it under the terms of the GNU General Public License\n\
...@@ -2339,6 +2349,11 @@ xb_get_one_option(const struct my_option *opt, ...@@ -2339,6 +2349,11 @@ xb_get_one_option(const struct my_option *opt,
} }
} }
break; break;
case OPT_RSYNC:
case OPT_NO_BACKUP_LOCKS:
if (my_handle_options_init_variables)
fprintf(stderr, "Obsolete option: %s. Ignored\n", opt->name);
break;
#define MYSQL_CLIENT #define MYSQL_CLIENT
#include "sslopt-case.h" #include "sslopt-case.h"
#undef MYSQL_CLIENT #undef MYSQL_CLIENT
......
...@@ -1167,12 +1167,6 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then ...@@ -1167,12 +1167,6 @@ if [ "$WSREP_SST_OPT_ROLE" = 'donor' ]; then
iopts="--databases-exclude='lost+found'${iopts:+ }$iopts" iopts="--databases-exclude='lost+found'${iopts:+ }$iopts"
if [ ${FORCE_FTWRL:-0} -eq 1 ]; then
wsrep_log_info "Forcing FTWRL due to environment variable" \
"FORCE_FTWRL equal to $FORCE_FTWRL"
iopts="--no-backup-locks${iopts:+ }$iopts"
fi
# if compression is enabled for backup files, then add the # if compression is enabled for backup files, then add the
# appropriate options to the mariadb-backup command line: # appropriate options to the mariadb-backup command line:
if [ "$compress" != 'none' ]; then if [ "$compress" != 'none' ]; then
......
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