restoring a galera cluster from a backup

1,019 views
Skip to first unread message

ctc...@gmail.com

unread,
Oct 28, 2016, 9:05:15 AM10/28/16
to codership
Is there a standard procedure for restoring a 3 node galera cluster from a backup (created using innobackupex)?

Philip Stoev

unread,
Oct 29, 2016, 3:30:42 AM10/29/16
to ctc...@gmail.com, codership
Hello,

The most straightforward procedure would be as if starting a completely new
cluster:

1. Start mysqld with wsrep_provider not set in my.cnf
2. Restore data onto that server
3. Set wsrep_provider and the rest of the Galera options in my.cnf and then
bootstrap the node (e.g. by passing --wsrep-new-cluster to the init script)
4. Let the other nodes join the newly-formed cluster. This will happen via
SST

Philip Stoev
--
You received this message because you are subscribed to the Google Groups
"codership" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to codership-tea...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ctc...@gmail.com

unread,
Oct 29, 2016, 5:48:19 AM10/29/16
to codership, ctc...@gmail.com
Hi Philip,
I am using galera 5.5.47 on CentOS 7, and I don't see a way to pass --wsrep-new-cluster to "systemctl start mysqld".
Also, this is a galera cluster as part of OpenStack, and the galera cluster is controlled by pacemaker using an OCF resource agent (in an HA Openstack setup based on quickstack / astapor from Redhat)

Chris

hunter86bg

unread,
Oct 29, 2016, 6:08:44 PM10/29/16
to codership, ctc...@gmail.com
Initial bootstrap is done via:
service mysql start --wsrep_new_cluster

or by creating a service file with a different name only for initial bootstrap (which is pointless).

ctc...@gmail.com

unread,
Oct 30, 2016, 4:23:40 AM10/30/16
to codership, ctc...@gmail.com
On my installation there is no mysql service, only mysqld, and I get:

# service mysqld start --wsrep_new_cluster
Redirecting to /bin/systemctl start  --wsrep_new_cluster mysqld.service
/bin/systemctl: unrecognized option '--wsrep_new_cluster'

hunter86bg

unread,
Oct 30, 2016, 10:39:07 AM10/30/16
to codership, ctc...@gmail.com
My version is for RHEL7 from codership's repository.

Are you using the mysql or the mariadb version ?

hunter86bg

unread,
Oct 30, 2016, 10:41:29 AM10/30/16
to codership, ctc...@gmail.com
Either try
service mysql start --wsrep-new-cluster

or
service mysql bootstrap


ctc...@gmail.com

unread,
Oct 31, 2016, 3:43:20 AM10/31/16
to codership, ctc...@gmail.com
We're using mariadb, and the rpms are galera-25.3.12-2.el7.x86_64 (from epel), mariadb-galera-common-5.5.40-3.el7.x86_64 and mariadb-galera-server-5.5.40-3.el7.x86_64 (from http://mirror.centos.org/centos/7/cloud/x86_64/openstack-liberty/common/)
Reply all
Reply to author
Forward
0 new messages