mariabackup SST method

You are viewing an old version of this article. View the current version here.

The mariabackup SST method uses the Mariabackup utility for performing SSTs. It is one of the two non-locking methods. Note that if you use the mariabackup SST method, you also need to have socat installed on the server. This is needed to stream the backup from the donor to the joiner. This is a limitation inherited from the xtrabackup-v2 SST method.

This SST method is available from MariaDB 10.1.26 and MariaDB 10.2.10.

Choosing Mariabackup for SSTs

To use the mariabackup SST method, you must set the wsrep_sst_method=mariabackup on both the donor and joiner node. For example:

[mysqld]
...
wsrep_sst_method = mariabackup

Authentication and Privileges

In order for the mariabackup SST method, Mariabackup needs to be able to authenticate locally on the donor node, so that it can create a backup to stream to the joiner. You can tell the client what username and password to use by setting the wsrep_sst_auth system variable. For example:

[mysqld]
...
wsrep_sst_method = mariabackup
wsrep_sst_auth = user:password

This user need to have the RELOAD , PROCESS, LOCK TABLES and REPLICATION CLIENT privileges. To be safe, you should ensure that these privileges are set on each node in your cluster. Mariabackup connects locally on the donor node to perform the backup, so the following user should be sufficient:

GRANT RELOAD, PROCESS, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'mariabackup'@'localhost';

Socat Dependency

During the SST process, the donor node uses socat to stream the backup to the joiner node. Then the joiner node prepares the backup before restoring it. The socat utility must be installed on both the donor and the joiner in order for this to work. Otherwise, the MariaDB error log will contain an error like:

WSREP_SST: [ERROR] socat not found in path: /usr/sbin:/sbin:/usr//bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin (20180122 14:55:32.993)

TLS

To secure the SST transfer using TLS, see

Logs

The mariabackup SST method has its own logging outside of the MariaDB Server logging.

By default, on the donor node, it logs to innobackup.backup.log. This log file is located in the datadir.

By default, on the joiner node, it logs to innobackup.prepare.log and innobackup.move.log. These log files are located in the .sst directory, which is a hidden directory inside the datadir.

These log files are overwritten by each subsequent SST, so if an SST fails, it is best to copy them somewhere safe before starting another SST, so that the log files can be analyzed. See MDEV-17973 about that.

You can redirect the SST logs to the syslog instead by setting the following in your MariaDB configuration file:

[sst]
sst-syslog=1

Manual SST with Mariabackup

In some cases, if Galera Cluster's automatic SSTs repeatedly fail, then it can be helpful to perform a "manual SST". See the following page on how to do that:

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.