How to perform a SST manually
  • 1 minute to read
  • Dark
    Light
  • PDF

How to perform a SST manually

  • Dark
    Light
  • PDF

Article summary

This article provides instructions on how to perform a full data transfer, known as State Snapshot Transfer (SST), manually on the Primary cluster member.

Important

Only proceed with these steps if you’re certain that no instances of senhasegura are running in your environment.

How to perform a State Snapshot Transfer manually on the Primary cluster member

Steps on the Primary member

  1. Check the synchronization status:
sudo orbit cluster status
  1. Stop the MariaDB process:
sudo systemctl stop mysql
  1. Remove old cluster control files:
sudo rm /var/lib/mysql/galera.cache


sudo rm /var/lib/mysql/grastate.dat


sudo rm /var/lib/mysql/multi-master.info
  1. Start the MariaDB process:
sudo galera_new_cluster

Steps on the secondary member

Cuidado

If you operate a cluster with more than one secondary member, apply the steps intended for the secondary member to all of them.

  1. Stop the MariaDB process:
sudo systemctl stop mysql
  1. Rename the current database data folder to a backup one:
sudo mv /var/lib/mysql /var/lib/mysql-$(date +%d%m%y%H%M)
  1. Create a new database folder:
sudo install -d /var/lib/mysql -o mysql -g mysql
  1. Confirm that replication is enabled in the configuration file: galera.cnf.

  2. Edit the configuration file: /etc/mysql/conf.d/galera.cnf.

  3. Save the file and exit the editor.

  4. Open another terminal and monitor the database logs:

sudo tailf /var/log/mysql/mysql-error.log
  1. Start the MariaDB process:
sudo systemctl start mysql
  1. Check if the cluster member count is correct in the database log. For example, if there are 2 members, the message should be: members = 2/2(joined/total).

  2. Verify that the synchronization confirmation message is:

WSREP: Member 0.0 (vsrv-senhasegura-cert05) synced with group.

Do you still have questions? Reach out to the senhasegura Community.


Was this article helpful?