Ad Widget

Collapse

Zabbix Database replication

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • userSL_nuwan
    Junior Member
    • Feb 2019
    • 16

    #1

    Zabbix Database replication

    Hi There,

    We have Requirement to replicate Zabbix server databases. Because we have one server in one country and other server in another country so how do we replicate these 2 servers.
    Both servers running MySQL as BD. Is there any specific way to replicate this,

    Appreciate your help
  • dbatechnologies
    Junior Member
    • Dec 2014
    • 11

    #2
    It actually doesn't matter if servers are in the same subnet or in different countries, as long as they can talk to each other and the data transfer speed is good. You need to be sure that port 3306 is open on both and that you can log in to mysql from both servers to the other.
    I would recommend asynchronous replication (synchronous causes that master wait for confirmation from slave, that transaction was successfully applied).
    Install mysql on the slave, configure firewall (open 3306 for master, and then configure firewall on master - open 3306 for slave).
    First you need to make master database dump, with parameter set for setting master data for slave (transaction ID most importantly), set a user on master for replication and grant required privileges, restore that dump to slave database, set proper variables like master server, user, password etc. and start slave.
    If you need more detailed guide, I can write something, but there is plenty of them in the internet. If you don't like command line, you can use ClusterControl from SeveralNines to install everything. I think community edition allows to set up replication. They also released good guide on how to do this https://severalnines.com/resources/w...h-availability

    Comment

    • userSL_nuwan
      Junior Member
      • Feb 2019
      • 16

      #3
      Originally posted by dbatechnologies
      It actually doesn't matter if servers are in the same subnet or in different countries, as long as they can talk to each other and the data transfer speed is good. You need to be sure that port 3306 is open on both and that you can log in to mysql from both servers to the other.
      I would recommend asynchronous replication (synchronous causes that master wait for confirmation from slave, that transaction was successfully applied).
      Install mysql on the slave, configure firewall (open 3306 for master, and then configure firewall on master - open 3306 for slave).
      First you need to make master database dump, with parameter set for setting master data for slave (transaction ID most importantly), set a user on master for replication and grant required privileges, restore that dump to slave database, set proper variables like master server, user, password etc. and start slave.
      If you need more detailed guide, I can write something, but there is plenty of them in the internet. If you don't like command line, you can use ClusterControl from SeveralNines to install everything. I think community edition allows to set up replication. They also released good guide on how to do this https://severalnines.com/resources/w...h-availability
      Thank you so much for Support.

      Yes we have Site to site VPN can communicate through countries.Actually we already have configurations on One Server. We need to copy all the configurations to other server but first server must be Master and other one must be Slave.

      Appreciate your help

      Comment

      Working...