I have a Joomla/Virtuemart installation and i want to create a master-slave replication with 1 slave The Slave will be used as a failover in case there is something wrong with the master.

The switching procedure of course will not be automatic as i will have to change the A records of the dns zone to the slave server. I also understand that if i want to use the master server again, i will have to setup the replication from the beggining.

To the question: If let's say the replication has been running for a year and i decide to switch to the slave server, will the slave be an exact copy of the master? Meaning will all data be intact or there's a chance that it won't be, since the replication is asynchronous?

1 Answer 1


Answer is Yes, if there is no issues between master and slave. But MariaDB couldn't guarantee database consistency, because replication is asynchronous. To prevent such issues you should monitor replication state.

  • could you please point on how can i do that?
    – Meni
    Sep 13, 2019 at 16:15
  • @Meni, you could try to use this article Sep 13, 2019 at 16:54
  • Thank you for this, i really appreciate it. too bad my reputation is low and i can't upvote your answer.
    – Meni
    Sep 16, 2019 at 8:18
  • @ Alexander-Tolkachev the percona solution is too complicated for my needs, therefore i have created a bash script which emails the output of show slave status\G; on the slave on daily basis. do you believe that this method is efficient enough?
    – Meni
    Sep 26, 2019 at 13:44
  • @Meni it depends on your needs. If it's okay for you, that's good. :) I will not like such approach, because in worst case I will have broken replication for one day. Sep 27, 2019 at 13:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .