summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_mariabackup.sh
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-25356: SST scripts should use the new mariabackup interfacebb-10.2-MDEV-25356Julius Goryavsky2021-04-111-7/+7
| | | | | | | | | | | SST scripts for Galera should use the new mariabackup interface instead of the innobackupex interface, which is currently only supported for compatibility reasons. This commit converts the SST script for mariabackup to use the new interface. It does not need separate tests, as any problems will be seen as failures when running multiple tests for the mariabackup-based SST.
* Don't pass password to innobackup via command line, use environment insteadbb-10.2-codership-cmd-line-pswdAlexey Yurchenko2021-03-291-3/+3
| | | | Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
* MDEV-21951: mariabackup SST fail if data-directory have lost+found directoryJulius Goryavsky2020-10-201-1/+3
| | | | | | | | | | | | | To fix this, it is necessary to add an option to exclude the database with the name "lost+found" from processing (the database name will be checked by the check_if_skip_database_by_path() or by the check_if_skip_database() function, and as a result "lost+found" will be skipped). In addition, it is necessary to slightly modify the verification logic in the check_if_skip_database() function. Also added a new test galera_sst_mariabackup_lost_found.test
* MDEV-21770: `galera_3nodes.galera_ipv6_mariabackup` failsJulius Goryavsky2020-10-151-28/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes several flaws in the SST scripts that cause failures while running tests that use version 6 IP addresses for cluster nodes. First, if the netcat utility is used for streaming (but not socat), then in accordance with its command line syntax, we need to remove the square brackets around the IPv6 address. However, for socat, the address must contain square brackets, as before. Secondly, if an IPv6 address is used, then from the joiner side for a number of systems (such as Debian) we need to explicitly specify the "-6" option, otherwise a listening socket with an IPv6 address may not be created. This patch also contains code improvements in the wsrep_sst_common. Changed the code that pars the connection address - fixed the shortcomings that sometimes led to incorrect parsing of parameters when using shells other than the latest versions of bash. Also, this patch removes the duplicate code that is intended for parsing the connection address and which was located in the wsrep_sst_mariabackup file, since all the necessary actions have already been done in wsrep_sst_common and there they are done in such a way that any shell is supported, not just bash. The fix does not require separate tests, since all the necessary tests are already present in the galera_3nodes suite. On the contrary, after this fix, tests using IPv6 addresses can be removed from the disabled list (this will be done in a separate commit related to MDEV-23659).
* Increase mariabackup SST initial timeout to avoid timeouts.Jan Lindström2020-09-021-3/+4
|
* Merge 10.1 into 10.2Marko Mäkelä2020-08-131-8/+17
|\
| * MDEV-21526: mysqld_multi no longer works with different server binariesJulius Goryavsky2020-08-111-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is caused by the fact that adding the --defaults-group-suffix option to fix MDEV-18863 causes mysqld to read all options from the appropriate sections of the config file, including options specific to mysqld_multi. Reading unknown options (which are not supported by mysqld) causes mysqld to terminate with an error. However, the MDEV-18863 problem has been completely fixed by passing options on the command line, and now there is no need to specify the --defaults-group-suffix option (we just need to give priority to options passed through the command line, so as not to break MDEV-18863).
* | MDEV-22554: galera_sst_mariabackup fails with "Failed to start mysqld.2"Julius Goryavsky2020-05-181-1/+5
| | | | | | | | | | | | | | The problem is caused by the operation of netcat streamer and does not appear on systems where socat is installed. We need to add the "-N" option for netcat to call shutdown() on the socket when receiving EOF from STDIN.
* | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-01-241-2/+2
|\ \ | |/
| * MDEV-17601: MariaDB Galera does not expect 'mbstream' as streamfmtJulius Goryavsky2020-01-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | Setting "streamfmt=mbstream" in the "[sst]" section causes SST to fail because the format automatically switches to 'tar' by default (insead of mbstream). To fix this, we need to add mbstream to the list of valid values for the format, making it synonymous with xbstream. This must be done both in the SST script and when parsing the options of the corresponding utilities.
* | manual merge 10.1->10.2Andrei Elkin2019-11-111-0/+7
|\ \ | |/
| * MDEV-20981 wsrep_sst_mariabackup fails silently when mariabackup is not ↵Hartmut Holzgraefe2019-11-081-0/+7
| | | | | | | | | | | | installed (#1406) Make sure failure to find mariabackup binary does not terminate the script silently, terminate with a clear error message instead
* | Merge 10.1 into 10.2Marko Mäkelä2019-08-281-14/+12
|\ \ | |/
| * Improved handling of subdirectories in the xtrabackup-v2 SST scripts ↵Julius Goryavsky2019-08-281-2/+2
| | | | | | | | (similar to MDEV-18863) for more predictable test results (related to xtrabackup-v2 SST)
| * MDEV-20420: SST failed after MDEV-18863 in some test configurationsJulius Goryavsky2019-08-261-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | After applying MDEV-18863, in some test configurations, SST may fails due to duplication of some parameters (in particular "--port") in the main part of the command line and after "--mysqld-args", as well as due to incorrect interpretation of the parameter "--port" passed after "--mysqld-args" when the SST script is invoked without explicitly specifying a port for SST. In addition, it is necessary to correctly handle spaces, quotation marks and special characters when copying original arguments from the argv[] array to a new command line (after "--mysqld-args"). This patch resolves these shortcomings.
| * MDEV-18863: Galera SST scripts can't read [mysqldN] option groupsJulius Goryavsky2019-08-191-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users and some scripts (for example, mysqld_multi.sh) use special option groups with names like [mysqld1], [mysqld2], ..., [mysqldN]. But SST scripts can't currently fully support these option groups. The only option group-related value it gets from the server is --defaults-group-suffix, if that option was set for mysqld when the server was started. However, the SST scripts does not get told by the server to read these option groups, so this means that the SST script will fail to read options like innodb-data-home-dir when it is in a option group like [mysqld1]...[mysqldN]. Moreover, SST scripts ignore many parameters that can be passed to them explicitly and cannot transfer them further, for example, to the input of mariabackup utility. Ideally, we want to transfer all the parameters of the original mysqld call to utilities such as mariabackup, however the SST script does not receive these parameters from the server and therefore cannot transfer them to mariabackup. To correct these shortcomings, we need to transfer to the scripts all of the parameters of the original mysqld call, and in the SST scripts themselves provide for the transfer all of these parameters to utilities such as mariabackup. To prevent these parameters from mixing with the script's own parameters, they should be transferred to SST script after the special option "--mysqld-args", followed by the string argument with the original parameters, as it received by the mysqld call at the time of launch (further all these parameters will be passed to mariabackup, for example). In addition, the SST scripts themselves must be refined so that they can read the parameters from the user-selected group, not just from the global mysqld configuration group. And also so that they can receive the parameters (which important for their work) as command-line arguments.
* | MDEV-18863: Galera SST scripts can't read [mysqldN] option groupsJulius Goryavsky2019-08-191-6/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some users and some scripts (for example, mysqld_multi.sh) use special option groups with names like [mysqld1], [mysqld2], ..., [mysqldN]. But SST scripts can't currently fully support these option groups. The only option group-related value it gets from the server is --defaults-group-suffix, if that option was set for mysqld when the server was started. However, the SST scripts does not get told by the server to read these option groups, so this means that the SST script will fail to read options like innodb-data-home-dir when it is in a option group like [mysqld1]...[mysqldN]. Moreover, SST scripts ignore many parameters that can be passed to them explicitly and cannot transfer them further, for example, to the input of mariabackup utility. Ideally, we want to transfer all the parameters of the original mysqld call to utilities such as mariabackup, however the SST script does not receive these parameters from the server and therefore cannot transfer them to mariabackup. To correct these shortcomings, we need to transfer to the scripts all of the parameters of the original mysqld call, and in the SST scripts themselves provide for the transfer all of these parameters to utilities such as mariabackup. To prevent these parameters from mixing with the script's own parameters, they should be transferred to SST script after the special option "--mysqld-args", followed by the string argument with the original parameters, as it received by the mysqld call at the time of launch (further all these parameters will be passed to mariabackup, for example). In addition, the SST scripts themselves must be refined so that they can read the parameters from the user-selected group, not just from the global mysqld configuration group. And also so that they can receive the parameters (which important for their work) as command-line arguments.
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-03-111-30/+42
|\ \ | |/
| * wsrep_sst: remove WSREP_SST_OPT_SUFFIX_VALUE, checking [mysqld] is covered ↵Daniel Black2019-03-091-4/+1
| | | | | | | | in the parse_cnf --mysqld case
| * MDEV-18830: Port SST fixes from 10.4 to 10.1Jan Lindström2019-03-091-34/+59
| | | | | | | | | | | | | | | | | | | | modified: mysql-test/suite/galera/disabled.def modified: mysql-test/suite/galera/r/galera_many_rows.result modified: mysql-test/suite/galera/t/galera_kill_nochanges.test new file: mysql-test/suite/galera/t/galera_many_rows.cnf modified: mysql-test/suite/galera/t/galera_many_rows.test modified: mysql-test/suite/galera/t/galera_var_dirty_reads.test modified: scripts/wsrep_sst_mariabackup.sh
| * MDEV-18426: Most of the mtr tests in the galera_3nodes suite failJulius Goryavsky2019-02-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the mtr tests in the galera_3nodes suite fail for a variety of reasons with a variety of errors. This patch fixes several substantial flaws in the galera_3nodes suite tests and in the mtr framework service files, adapting the tests from galera_3nodes for the current version of MariaDB. This patch also synchronizes some galera_3nodes-related files with the latest changes made for MDEV-17835 (v2 patch) and for MDEV-18379 in other branches (10.2 and 10.3). Closes #1161
* | MDEV-18379: IPv6 compatibility changes/Unification of check for IPv6Julius Goryavsky2019-02-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the port of the MDEV-18379 patch for 10.2 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 4) Fixed flaws in the rsync and mysqldump tests (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" that is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835
* | Merge 10.1 into 10.2Marko Mäkelä2019-02-021-6/+22
|\ \ | |/
| * MDEV-18379: Unification of check for IPv6Julius Goryavsky2019-01-261-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains the port of the MDEV-18379 patch for 10.1 branch, but also includes a number of changes made within MDEV-17835, which are necessary for the normal operation of tests that use IPv6: 1) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 2) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 3) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. 4) Currently, the three-node mtr suite for Galera (galera_3nodes) uses a separate IPv6 availability check using the "have_ipv6.inc" file. This check duplicates a more accurate check at suite.pm level, which can be used by including the file "check_ipv6.inc". This patch removes this discrepancy between suites. 5) GAL-501 test in the galera_3nodes suite does not contain the option "--bind-address=::" which is needed for the test to work correctly with IPv6 (at least on some systems), since without it the server will not wait for connections on the IPv6 interface. https://jira.mariadb.org/browse/MDEV-18379 and partially https://jira.mariadb.org/browse/MDEV-17835
* | Merge 10.1 into 10.2Marko Mäkelä2019-01-231-8/+70
|\ \ | |/
| * MDEV-17973: Don't overwrite xtrabackup-v2/mariabackup SST logs by defaultGeoff Montee2019-01-211-8/+70
| |
* | Use absolute path for mariabackup binaryTao ZHOU2019-01-021-1/+1
| |
* | use `ps -p` instead of `ps --pid` Tao ZHOU2018-11-291-3/+2
| | | | | | | | make it compatible on FreeBSD. If the parent process does not exist, there's no need to kill it.
* | Make mariabackup.sh compatible on FreeBSDangeloudy2018-11-151-2/+12
| |
* | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-8/+24
|\ \ | |/
| * Merge pull request #786 from codership/10.1-MDEV-14612Jan Lindström2018-07-181-7/+2
| |\ | | | | | | MDEV-14612 wsrep_sst_mariabackup unnecessarily converts address to host name
| | * MDEV-14612 wsrep_sst_mariabackup unnecessarily converts address to host namesjaakola2018-06-071-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SST script for mariabackup (wsrep_sst_mariabackup.sh) does reverse DNS to convert the joiner's IP address to domain name, and this is not always a wanted feature. It is not understood why this remote host DNS conversion is in the script, in the first place, but conversion was originally added by commit: commit 3d8aacba861044843417b710fff208b8bd6a53c4 Author: Nirbhay Choubey <nirbhay.choubey@gmail.com> Date: Wed Feb 22 15:58:45 2017 -0500 In this commit, REMOTEHOST variable is removed and replaced by REMOTEIP. All references to joiner is therefore by IP address only.
| * | MDEV-15442 xtrabackup-v2 SST donor stuck in DONOR/DESYNCED state when joiner ↵mkaruza2018-06-201-1/+22
| |/ | | | | | | | | | | is killed SST transfer scripts rsync and maribackup now monitor parent process and will cleanup if process dies
* | Merge branch '10.1' into 10.2Sergei Golubchik2018-03-251-2/+16
|\ \ | |/
| * wsrep_sst scripts: support traditional netcatSergei Golubchik2018-03-231-2/+16
| |
* | MDEV-12548 Initial implementation of Mariabackup for MariaDB 10.2Marko Mäkelä2017-07-051-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | InnoDB I/O and buffer pool interfaces and the redo log format have been changed between MariaDB 10.1 and 10.2, and the backup code has to be adjusted accordingly. The code has been simplified, and many memory leaks have been fixed. Instead of the file name xtrabackup_logfile, the file name ib_logfile0 is being used for the copy of the redo log. Unnecessary InnoDB startup and shutdown and some unnecessary threads have been removed. Some help was provided by Vladislav Vaintroub. Parameters have been cleaned up and aligned with those of MariaDB 10.2. The --dbug option has been added, so that in debug builds, --dbug=d,ib_log can be specified to enable diagnostic messages for processing redo log entries. By default, innodb_doublewrite=OFF, so that --prepare works faster. If more crash-safety for --prepare is needed, double buffering can be enabled. The parameter innodb_log_checksums=OFF can be used to ignore redo log checksums in --backup. Some messages have been cleaned up. Unless --export is specified, Mariabackup will not deal with undo log. The InnoDB mini-transaction redo log is not only about user-level transactions; it is actually about mini-transactions. To avoid confusion, call it the redo log, not transaction log. We disable any undo log processing in --prepare. Because MariaDB 10.2 supports indexed virtual columns, the undo log processing would need to be able to evaluate virtual column expressions. To reduce the amount of code dependencies, we will not process any undo log in prepare. This means that the --export option must be disabled for now. This also means that the following options are redundant and have been removed: xtrabackup --apply-log-only innobackupex --redo-only In addition to disabling any undo log processing, we will disable any further changes to data pages during --prepare, including the change buffer merge. This means that restoring incremental backups should reliably work even when change buffering is being used on the server. Because of this, preparing a backup will not generate any further redo log, and the redo log file can be safely deleted. (If the --export option is enabled in the future, it must generate redo log when processing undo logs and buffered changes.) In --prepare, we cannot easily know if a partial backup was used, especially when restoring a series of incremental backups. So, we simply warn about any missing files, and ignore the redo log for them. FIXME: Enable the --export option. FIXME: Improve the handling of the MLOG_INDEX_LOAD record, and write a test that initiates a backup while an ALGORITHM=INPLACE operation is creating indexes or rebuilding a table. An error should be detected when preparing the backup. FIXME: In --incremental --prepare, xtrabackup_apply_delta() should ensure that if FSP_SIZE is modified, the file size will be adjusted accordingly.
* SST script for mariabackup.Nirbhay Choubey2017-04-271-0/+1040
Execute mariabackup in innobackupex mode to avoid "unknown argument" error.